Interface Bolt with Arduino

I need some who need to clearly explain how to interface Bolt Iot with Arduino. I just searched to forum to find the solution and the given solutions does not satisfy me. And also don’t refer the link “https://www.instructables.com/id/Interfacing-Bolt-With-Arduino-Bolt-UART/” to me. Because it does not clearly explain the procedure. I tried, but it does not work. I want anyone explain clearly how to interface bolt to arduino. The “BOLT IOT” team can give or upload a video in their youtube channel about the interfacing. Requesting the Bolt Team to solve this problem. Expecting the answers in the form of video.

@ykoffice6920, have you tried https://docs.boltiot.com/docs/uart-commands.

Difficult to work with it. I am asking how to interface bolt with arduino. for example, i have coded the program in arduino. consider the temperature sms experiment in our bolt training. I have coded the same in arduino. I want to interface bolt with arduino. When the temperature crosses threshold, the data should be sent to bolt cloud and bolt cloud should process and send sms to me. like that i am asking.

@ykoffice6920 check if something along these lines works for you https://create.arduino.cc/projecthub/bolt-iot-developers-u-p-region/trash-talker-using-bolt-iot-f2af5e

First you check the project. In python code, they are reading value from the pin 10. But in the schematic diagram, no wire connection is given to that pin.

The 10 does not refer to the pin number. Go through the link that @pankajkumar.p has given. It explains everything.
Also see this, https://docs.boltiot.com/docs/read-incoming-serial-data
It is reading till a newline character ‘\n’. ASCII code of ‘\n’ is 10. Hence the 10.

Ok .

How to Read analog pin values ( From A0 pin) in Arduino and import to bolt python code? The following is one of the code for Example.
while True:
response = mybolt.serialRead(A0)
data = json.loads(response)
sensor_value = data[‘value’]
Here I am getting an unsolved reference error.

You cannot read directly from the arduino GPIO pins directly to the bolt. The communication has to happen via the Tx and Rx pins.
Change the value from “A0” to 10.
Read the sensor data in the arduino itself, then send it to the serial. From there read the serial value in the bolt.
Here I have connected my Bolt to my arduino to switch of and switch on the led on pin 13 of arduino.
You can work along similar lines to solve your issue.
Python code:
image

Arduino code:

String status;
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  Serial.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  
Serial.println("what to do? ON or OFF"); //print to serial monitor
while(Serial.available()==0){            //wait for input in serial monitor
  }
  
status=Serial.readString();             //read inout from serial monitor
if (status=="ON"){
  digitalWrite(LED_BUILTIN, HIGH);       //Turn the LED on if "ON" in serial monitor
  delay(1000);
  }
if (status=="OFF"){                    //Turn the LED off if "OFF" in serial monitor
    digitalWrite(LED_BUILTIN, LOW);      //turn the LED off by making the voltage LOW
    delay(1000); 
  }                   
}
1 Like

you can connect the tx,rx pins of the bolt to the rx,tx pins in the arduino respectively,with this the arduino can send the informations which is prossesed in the arduino to the bolt iot module.You can use the serial.read() function in the bolt module code to read the value from the arduino digital or analog pins.you can checkout my project as an example:)