Hello ,
I want to turn on an led on my arduino board connected to bolt using UART connection using API calls.
Can Anyone tell me the exact steps with codes to do that?
Hello ,
I want to turn on an led on my arduino board connected to bolt using UART connection using API calls.
Can Anyone tell me the exact steps with codes to do that?
Yes its very simple
First check out how to Initialize serial communication
Also check out this how to send data over bolt
Connections: -
connect Bolt’s 5V pin to Arduino’s 5V Pin
connect Bolt’s Ground to Arduino’s Ground Pin
connect Bolt’s Rx to Arduino’s Tx
connect Bolt’s Tx to Arduino’s Rx
connect your LED’s long leg to Pin 13 of Arduino & short leg to Ground pin which is near to Pin 13 on Arduino
This is image for connections: -
Code For Arduino: -
Now
Note: - Replace “your_api_key” with your API Key & “BOLTXXXXX” with Your Bolt Device ID while sending request below
Now from your web browser send this
https://cloud.boltiot.com/remote/your_api_key/serialBegin?baud=9600&deviceName=BOLTXXXXX
Then send this from web browser to turn on LED
https://cloud.boltiot.com/remote/your_api_key/serialWrite?data=turnon&deviceName=BOLTXXXXX
To turn off LED send this
https://cloud.boltiot.com/remote/your_api_key/serialWrite?data=turnoff&deviceName=BOLTXXXXX
If you have any problem feel free to ask.