Arduino+Delphi MobileBasics
Victory FernandesEmbarcadero MVP-Brazil
@victoryjorge
Victory Fernandes• I love Delphi since 1998! • Embarcadero MVP-Brazil• Electrical Engineer; Msc. Medicine Neuro-
Science• CTO at TKSSoftware.com• Represent INDEVA Manipulators and AGVs
Hydroelectric Plant (~77% in Brazil)
Main control room
Worked with microcontrollers before?
•PARKIGLOVE - mbed NXP LPC1768
• Prototyping platforms• Open source Software and Hardware • Application? Size, power consumption…• 8bits, 32bits…• 16MHz, 95Mhz…• 32KB-512KB Flash; 2KB-32KB RAM…• 8051, PIC, AtMega, ARM…• Intel, Microchip, Atmel, Freescale, NXP…
• "Microcontrollers for Dummies"
• Introdução IoT
• Arduino Uno
www.arduino.cc www.arduino.org
• Arduino Shields?
+ +
+ =
• Delphi Intraweb realtime vehicle tracking
• www.shieldlist.org
• shieldlist.org
GameDuinoVGA OutputStereo Audio
NTSC and PAL output
• Video
Joystick
• Joysticks
MP3
• Sound
VoiceBoxSerial to Voice
Color LCD
16x2 display
7 segments display
Touch
• Display
DC motorH Bridge – 1A
DC motorH bridge – 2A
• Motors
Ethernet CAT5e
Ethernet CAT5e + Wi-Fi
• Network
microSD
SDCard
• Storage
ZigBee
CanBus
• Automation
Relays up to 220VAC
Protoboard
• Do it yourself!
Standard board
• Introdução IoT
• Arduino Mini, Micro, Nano…
• Small sizes…
• Arduino Lilypad
• Wearable projects…
Funcional Estética Diversão
• "Hello world”?
• "Hello world”?
• "Hello world”?
• "Hello world”?
• "Hello world”?
•Robocore Padawanwww.robocore.net/loja/produtos/arduino-shield-padawan.html
RGB LED
•DFRobot accessory boardwww.dfrobot.com/index.php?route=product/product&path=35&product_id=1045
RGB LED
• “Hello World”?
LED pin 13
Delphi Android/iOS app
ON
OFF
UDP Server192.168.1.177:8888
’H’ ’H’ ’H’=On’L’ ’L’ ’L’=Off
•Lets build our control protocol
from scratch
Lets start from Arduino UDP demo
Original code…Configure your network properly!
Added to the original code!
Added to original code!
•Now our code responds to strings ‘H’ and ‘L’
and pin 9 can be controlled remotely
• LED demo app…
• May the force be with you!
• LED is 5 VDC…
• We need 110/220 VAC…
• Light switch example…
• Relays
1
2
3
4 5
1
23
4
5
Coil + Current = Magnetic field
•Relay module… EUR 3,00www.robocore.net/loja/produtos/modulo-rele.html
•Relay module… EUR 3,00www.dfrobot.com/index.php?route=product/product&search=relay&description=true&product_id=64
• Lamp circuit
• Lamp demo app…
• Simple real life application…