Playing with some Arduino UNO boards and opening and closing lamps using the iOS app and the Arduino attached relays. Im using Arduino UNO with ethernet sheild that is connected to 4 relays on 4 different pins.
- Arduino UNO
- Ethernet Sheild
- Wiring cables and pins
- LED's (optional)
- LAN cable from your ethernet shield to your router
- Breadboard (optional)
- 4 Channel 10A Relay (30A is much more powerfull if you need to power up A/C or Heaters)
- Resistors (optional)
- USB Cable to power up Arduino board
- Go to Teleduino and make an account and put your secret key in plist file you will create in your project folder "Karsian Home" called in file ApiKeys.plist and the
Key = "TeleduinoKey" Value= "Your Secret Key"
- Download their C++ library and their examples. Use the proxy example and upload it to your Arduino.
- Make all your wirings from the Arduino to the relays. "Im using digital pins 4,5,6,7"
- Don't forget to attach the GND and the VCC.
Using the terminal go to your project folder. Create this podfile: "pod init" ----> "vim podfile"
platform :ios, '9.0' target 'Karsian Home' do use_frameworks! pod 'Alamofire', '~> 4.0' pod 'SwiftyJSON' end
-
ESC then save using ":x!" command. Then install the pod file: "pod install"
-
Open the
.xworkspace
extenstion and play the code.