nishat anjum khan
Member level 2
for my project i have to send two adc value and then have to plot it individually in MATLAB...can anyone give me suggestion that how can i send two ADC value via ARDUINO?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Code C++ - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 int analogPin1 = 0; // potentiometer wiper (middle terminal) connected to analog pin 0 // outside leads to ground and +5V int analogPin2 = 1; // potentiometer wiper (middle terminal) connected to analog pin 1 // outside leads to ground and +5V int val = 0; // variable to store the value read void setup() { Serial.begin(9600); // setup serial 9600 bps baudrate } void loop() { val = analogRead(analogPin1); // read the input pin Serial.println(val); // debug value delay(500); val = analogRead(analogPin2); // read the input pin Serial.println(val); // debug value delay(500); }