BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Code analog read A0 with arduino yun

Before creating the topic

  1. Search forum for similar topics
  2. Check http://docs.blynk.cc and http://help.blynk.cc/
  3. Add details :
    • Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
    • Smartphone OS (iOS or Android) + version
    • Blynk server or local server
    • Blynk Library version
    • Add your sketch code. :point_up:Code should be formatted as example below.

Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.


void loop()

Great, you’ve learned how to copy/paste… :smiley:

Is there a question you want to ask also? :thinking:

1 Like

Actually, not even that :joy: This text is automatically generated upon help topic creation.

I suspect the question/issue lies in the title… so an equally obscure answer should suffice…

int value = analogRead(A0);

1 Like

ik wil gewoon een simpele code om een analoge ingang te meten zonder virtuele pinnen . Kan ik een code krijgen voor mijn arduino yun visueel met blynk

Sure… run this and hook up a Gauge widget to Analog A0… Then after a few hours when you are bored with the limited direct pin controls, you can learn how to do more with Virtual Pins and coding :stuck_out_tongue_winking_eye:

https://examples.blynk.cc/?board=Arduino%20Yun&shield=Yun%20Bridge&example=GettingStarted%2FBlynkBlink

#include <Bridge.h>

#include <BlynkSimpleYun.h>

Blynk_READ5(V5)
{
sensorData = analogRead(A0);
Blynk.virtualWrite ( V5,sensordata);
}

void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:
Serial.println(voltage);
}

Aside from syntax errors in your code… it is not properly formatted here for forum viewing…

Blynk%20-%20FTFC