How to use "read analog pin (A)__" with the Arduino Nano Board using mBlock?


#1

When I try to create the program following this YouTube video https://youtu.be/gYIl0qp3VUo with the Arduino Nano Board, the analog panda does not show any value so I do not think the board works with analog read sensors. Do you have another way to see analog data coming through my sensor connected to A1?


#2

Hi,

You’ll need to go to the Extensions menu and activate the Arduino Library. After you do that, the Robots tab will have a set of blocks for the Arduino. There is block that says “read analog pin (A) ()” that should do what you want.


#3

Thank you so much for your reply but I did that. I created the same code like shown in the video but did not get anything. I wionder if I need to try it with the UNO board


#4

Hmm, so let me make sure that I understand what you have done.

You have set up an Arduino Nano with a breadboard, an LED, and a potentiometer according the the sketch.

You have ensured that yo have properly installed the Arduino driver for your computer.

You have upgraded the firmware for the Arduino.

You have attempted to reset the default program.

You loaded the Arduino sketch from the YouTube video.

Is all of this correct?


#5

Correct. I’m not getting any values from the sensor in A1 so the problem might be in the board itself. Do you know how to add another board to mBlock? I have a LillyPad Arduino


#6

I do not, but you could drop an email to support (support@makeblock.cc). I’m just starting to weed through how to build mBlock. :frowning:


#7