Hi Guys,
Please I am new and trying out Blynk example. I want to send my analogue data (dc voltages) on my A0, A1, A2 and A3 to my blynk app. I am using Arduino Uno with Ethernet shield. I have a webserver hosted on my SD card to be shown on a web. please what command should i use to capture thses data from the analog pins?
Also on my blynk app am using the Analog pin A0-A3
Reading this, I’m almost sure you totally ignored the docs.blynk.cc and examples.blynk.cc - pages created with a lot of efforts to help all newbies, who I was once either…
2 Likes
For read an analog pin, use analogRead(pin), for send the values to blynk use Blynk.virtualWrite(Vpin,value), for more information or examples of use, see the documentation at the links provided by @marvin7
1 Like
Thanks alot this was really helpful.
Thanks Marvin, am doing just that now and its really of help.
Please the data i want to push to the Blynk app is stored on my SD card on the ethernet shield board. see below data on SD card:
function GetArduinoInputs()
{
nocache = “&nocache=” + Math.random() * 1000000;
var request = new XMLHttpRequest();
request.onreadystatechange = function()
{
if (this.readyState == 4) {
if (this.status == 200) {
if (this.responseXML != null) {
data_val = this.responseXML.getElementsByTagName(‘analog’)[0].childNodes[0].nodeValue;
data_val2 = this.responseXML.getElementsByTagName(‘analog’)[1].childNodes[0].nodeValue;
data_val3 = this.responseXML.getElementsByTagName(‘analog’)[2].childNodes[0].nodeValue;
data_val4 = this.responseXML.getElementsByTagName(‘analog’)[3].childNodes[0].nodeValue;
## data_val1 = data_val(23.99/1024.0)4.95;
** data_val2 = data_val2*(24.01 /1024.0)2.31;*
** data_val3 = data_val3*(167.0/1024.0)2.82;*
** data_val4 = data_val4*(167.0/1024.0)2.75;*
}
I would want blynk to display the result “data_val1 to data_val4” from the SD card been displayed on the web to Blynk. Please do you have any idea I can go about it?
Put some widgets at app and configure the virtual pin of each…
then when you get the correct values at data_vals… do
Blynk.virtualWrite(V1,data_val1);
Blynk.virtualWrite(V2,data_val2);
Blynk.virtualWrite(V3,data_val3);
Blynk.virtualWrite(V4,data_val4);