Upload
vic-fernandes
View
278
Download
0
Embed Size (px)
Citation preview
Arduino+Mobile AppsBasics and Beyond
Victory Fernandes
• Embarcadero MVP-Brazil• Electrical Engineer; Msc. Medicine Neuro-
Science• CTO at TKSSoftware.com
Hydroelectric Plant (~77% in Brazil)
Main control room
Worked with microcontrollers before?
•PARKIGLOVE - mbed NXP LPC1768
Production tracking as we found!
Ethernet IO device
Delphi Intraweb app on TV
Atozed Intraweb app on Mobile + SMS
• Introdução IoT
• Arduino Uno
www.arduino.cc www.arduino.org
• Arduino Shields?
+ +
+ =
• Atozed 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
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…
•Robocore Padawanwww.robocore.net/loja/produtos/arduino-shield-padawan.html
Temperaturesensor
Potentiometer
RGB LEDGeneral connector supportsDigital inputDigital outout/PWM
7 segmentdiplay
Lightsensor
•DFRobot accessory boardwww.dfrobot.com/index.php?route=product/product&path=35&product_id=1045
RGB LED
Joystick
Potentiometer
RelayBuzzer
LCD Display
Pressure/Humidity
•But our protocol must be able
to control all the pins…
•Its time to go a little deeper into the Arduino C Language
•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
• Coding the complete Arduino C code…