Interfacing Bolt with Arduino


#21

thanks sir i got my solution
thankyou very very much@datta.naik sir


#22

Hello sir i have to run my motor as well as data visualisation of sensor ,is it possible from bolt ?


#23

Hello sir i have to run my motor as well as data visualisation of sensors together ,is it possible from bolt cloud using html code ? when i click my button of motor on then motor become start and when we click motor off then motor off and we have also interfaced sensor to bolt and want get visualisation data at the same time from boltcloud


#24

Yes it is possible,

Use different serial data to control the motors connected to arduino.

Example send ā€œwā€ to start the motors, ā€œsā€ to stop the motors etc.


#25

Hello sir,
I want to interface bolt with Arduino nano and read the analog values (Temperature, Light_intensity) using the UART commands. I have done a Mobile App which reads a single analog data from bolt through API commands and print it, but i want to read two analog values and this is why i got a new nano board. I am new to Arduino IDE and i dont know what code to be written.

Please help me and let me know how to interface, code and get the analog values from arduino through UART commands.


#26

Hello sir,

I had interfaced Arduino Nano with Bolt written code for getting Analog data from nano to bolt. But, I am not able to get the values. This is my code :

#include <BoltIoT-Arduino-Helper.h>

String returnLoggableData(String *data){
	String retval="";
	retval=retval+analogRead(A0)+",";
	retval=retval+analogRead(A1)+",";
	retval=retval+analogRead(A2)+",";
	retval=retval+analogRead(A3)+",";
	retval=retval+analogRead(A4)+",";
	retval=retval+analogRead(A5);
	return retval;
}


String returnExtraMonitoringData(String *data){
	String retval="";
	retval=retval+digitalRead(2)+",";
	retval=retval+digitalRead(3)+",";
	retval=retval+digitalRead(4)+",";
	retval=retval+digitalRead(5)+",";
	retval=retval+digitalRead(6);
	return retval;	
}

String runPwmCommand(String *data){
	int pwmChannel=data[0].toInt();
	int pwmValue=data[1].toInt();
}

void setup(){
	boltiot.begin(Serial);
	boltiot.setCommandString("GetAnalogData",returnLoggableData);
	boltiot.setCommandString("GetData",returnExtraMonitoringData);
	boltiot.setCommandString("PWM",runPwmCommand,2);  //2 arguments are required, 1 is pwm channel and 2 is pwm value.
}

void loop(){
	boltiot.handleCommand();
}

I had used this Api call to get analog data :

https://cloud.boltiot.com/remote/a0XXXXXd-fXXXX-4006-XXXXX-1cXXXXXXXe/serialWR?data=GetAnalogData&deviceName=BOLTXXXXX

But my output is:

{"value": "", "success": "0"}

But I am able to get those values serial Monitor (Arduino IDE)
Please help me


#27

Hi Shrikanth,

Your code seems to be proper.

I would suggest you to recheck your connections.

This is normally the root cause for not retrieving data from an Arduino interfaced with the Bolt unit.
It is for this very reason that we have designed the BoltDuino (Earlier called the Bolt IoT Arduino Adapter)


#28

Hi @shree1998juhi,

I forgot to tag you in the previous post.