do you have ideas or experiences on how to create an app to control AC lights on/off? what should be the right hardware platform if i want to use a library for b4a that already exists?
Hi, wow thanks for the information! I like the second option better, because i want to create a complex scenario. One question: which library should i use for Arduino? Is there any example?
You don't need any special library for using Arduino. You need Serial, Asyncstreams and maybe ByteConverter.
The establishment of the connection is done by the pc or the device to the arduino - pc starts serial object to the arduino com port (when in usb) or device finds the Bluetooth of the arduino. In both cases the data is passed by Asyncstreams. I have found that using AsyncstreamsText is very useful to receive complete data messages from Arduino.
Derez, thank you 100000000 times for your precious help. I noticed Arduino "Mega ADK" board seems to be more suitable for android. Do you know the difference? is that i can directly plug to the android USB, right? 'cause that would help..
I am not familiar with this Arduino. I have received Arduino Uno starter set from my kids as a birthday present 3 month ago and I'm building cars since then...
I've googled and saw what it is. I don't see the advantage of connecting with a usb cable to the android, I prefer the BT connection, but may be I don't see your app type. As I wrote above, I build cars and they do not move well with a cable hanging from them.
Hi, in my case I used the following hardware setup.
1. Arduino mega(Uno will be fine)
2. Solid state relay(to switch motored appliances)
3. Android phone as main controller and SMS receiver
4. OTG cable
See example(
)
do you have ideas or experiences on how to create an app to control AC lights on/off? what should be the right hardware platform if i want to use a library for b4a that already exists?
Why not just get WiFi controlled LED lights like Limitless or Mi-light? Much cheaper and safer than messing around with relays and AC power. You can use my library or check out my app that turns lights on and off based on a schedule (https://play.google.com/store/apps/details?id=com.tchart.scheduled). All my outdoor lights are automated.
simple: Arduino Uno + Bluetooth + relay with B4A code Bluetooth
difficult : Arduino UNO + Ethernet + relay with B4A code UDP
more: Arduino UNO + GSM Shield + relay with B4A code SMS