CodeRage XI international Conference: Arduino + Delphi Mobile Apps
-
Upload
vic-fernandes -
Category
Technology
-
view
275 -
download
0
Transcript of CodeRage XI international Conference: Arduino + Delphi Mobile Apps
![Page 1: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/1.jpg)
Arduino+Mobile AppsBasics and Beyond
![Page 2: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/2.jpg)
Victory Fernandes
• Embarcadero MVP-Brazil• Electrical Engineer; Msc. Medicine Neuro-
Science• CTO at TKSSoftware.com
![Page 3: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/3.jpg)
Hydroelectric Plant (~77% in Brazil)
![Page 4: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/4.jpg)
Main control room
![Page 5: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/5.jpg)
![Page 6: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/6.jpg)
Worked with microcontrollers before?
![Page 7: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/7.jpg)
![Page 8: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/8.jpg)
•PARKIGLOVE - mbed NXP LPC1768
![Page 9: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/9.jpg)
![Page 10: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/10.jpg)
Production tracking as we found!
![Page 11: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/11.jpg)
Ethernet IO device
![Page 12: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/12.jpg)
Delphi Intraweb app on TV
![Page 13: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/13.jpg)
Atozed Intraweb app on Mobile + SMS
![Page 14: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/14.jpg)
• Introdução IoT
• Arduino Uno
www.arduino.cc www.arduino.org
![Page 15: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/15.jpg)
• Arduino Shields?
![Page 16: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/16.jpg)
+ +
+ =
![Page 17: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/17.jpg)
• Atozed Intraweb realtime vehicle tracking
![Page 18: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/18.jpg)
![Page 19: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/19.jpg)
• www.shieldlist.org
![Page 20: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/20.jpg)
• shieldlist.org
![Page 21: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/21.jpg)
![Page 22: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/22.jpg)
![Page 23: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/23.jpg)
GameDuinoVGA OutputStereo Audio
NTSC and PAL output
• Video
![Page 24: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/24.jpg)
Joystick
• Joysticks
![Page 25: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/25.jpg)
MP3
• Sound
VoiceBoxSerial to Voice
![Page 26: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/26.jpg)
Color LCD
16x2 display
7 segments display
Touch
• Display
![Page 27: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/27.jpg)
DC motorH Bridge – 1A
DC motorH bridge – 2A
• Motors
![Page 28: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/28.jpg)
Ethernet CAT5e
Ethernet CAT5e + Wi-Fi
• Network
![Page 29: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/29.jpg)
microSD
SDCard
• Storage
![Page 30: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/30.jpg)
ZigBee
CanBus
• Automation
Relays up to 220VAC
![Page 31: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/31.jpg)
Protoboard
• Do it yourself!
Standard board
![Page 32: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/32.jpg)
![Page 33: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/33.jpg)
• Introdução IoT
• Arduino Mini, Micro, Nano…
![Page 34: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/34.jpg)
• Small sizes…
![Page 35: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/35.jpg)
• Arduino Lilypad
![Page 36: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/36.jpg)
• Wearable projects…
Funcional Estética Diversão
![Page 37: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/37.jpg)
• "Hello world”?
![Page 38: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/38.jpg)
• "Hello world”?
![Page 39: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/39.jpg)
• "Hello world”?
![Page 40: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/40.jpg)
• "Hello world”?
![Page 41: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/41.jpg)
• "Hello world”?
![Page 42: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/42.jpg)
•Robocore Padawanwww.robocore.net/loja/produtos/arduino-shield-padawan.html
RGB LED
![Page 43: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/43.jpg)
•DFRobot accessory boardwww.dfrobot.com/index.php?route=product/product&path=35&product_id=1045
RGB LED
![Page 44: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/44.jpg)
• “Hello World”?
LED pin 13
![Page 45: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/45.jpg)
Android/iOS app
ON
OFF
UDP Server192.168.1.177:8888
’H’ ’H’ ’H’=On’L’ ’L’ ’L’=Off
![Page 46: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/46.jpg)
•Lets build our control protocol
from scratch
![Page 47: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/47.jpg)
![Page 48: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/48.jpg)
Lets start from Arduino UDP demo
![Page 49: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/49.jpg)
Original code…Configure your network properly!
![Page 50: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/50.jpg)
Added to the original code!
![Page 51: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/51.jpg)
Added to original code!
![Page 52: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/52.jpg)
•Now our code responds to strings ‘H’ and ‘L’
and pin 9 can be controlled remotely
![Page 53: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/53.jpg)
![Page 54: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/54.jpg)
![Page 55: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/55.jpg)
![Page 56: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/56.jpg)
• LED demo app…
![Page 57: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/57.jpg)
• May the force be with you!
![Page 58: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/58.jpg)
• LED is 5 VDC…
![Page 59: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/59.jpg)
• We need 110/220 VAC…
![Page 60: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/60.jpg)
![Page 61: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/61.jpg)
• Light switch example…
![Page 62: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/62.jpg)
• Relays
![Page 63: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/63.jpg)
1
2
3
4 5
1
23
4
5
Coil + Current = Magnetic field
![Page 64: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/64.jpg)
•Relay module… EUR 3,00www.robocore.net/loja/produtos/modulo-rele.html
![Page 65: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/65.jpg)
•Relay module… EUR 3,00www.dfrobot.com/index.php?route=product/product&search=relay&description=true&product_id=64
![Page 66: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/66.jpg)
• Lamp circuit
![Page 67: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/67.jpg)
• Lamp demo app…
![Page 68: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/68.jpg)
• Simple real life application…
![Page 69: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/69.jpg)
•Robocore Padawanwww.robocore.net/loja/produtos/arduino-shield-padawan.html
Temperaturesensor
Potentiometer
RGB LEDGeneral connector supportsDigital inputDigital outout/PWM
7 segmentdiplay
Lightsensor
![Page 70: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/70.jpg)
•DFRobot accessory boardwww.dfrobot.com/index.php?route=product/product&path=35&product_id=1045
RGB LED
Joystick
Potentiometer
RelayBuzzer
LCD Display
Pressure/Humidity
![Page 71: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/71.jpg)
•But our protocol must be able
to control all the pins…
![Page 72: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/72.jpg)
•Its time to go a little deeper into the Arduino C Language
![Page 73: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/73.jpg)
•Supported string messages…
‘dw04h’ = digital write pin 4 high‘dr02’ = digital read pin 02
‘aw03255’ = analog write pin 3 value 255
‘ar02’ = analog read pin 2
![Page 74: CodeRage XI international Conference: Arduino + Delphi Mobile Apps](https://reader031.fdocuments.in/reader031/viewer/2022022201/5889fb211a28ab0f388b5747/html5/thumbnails/74.jpg)
• Coding the complete Arduino C code…