My Solution to Paul McWhorter's 'Arduino with Python: LESSON 6' homework.

preview_player
Показать описание
Here I show the Arduino and Python code I have written for Paul McWhorter's "Arduino with Python: LESSON 6" homework.

Building on last weeks hardware and software, I have worked on the Python (and vPython) code add some eye candy to make my virtual analog voltage meter look great. I now have a volt meter inside a glass cover and screwed to a metal plate with my logo stamped on it.

Visit Paul's video here:

You can get Paul's code here (he does not seem to have posted anything for Lesson 6 yet):

My code, as used in the video, is here:
Рекомендации по теме
Комментарии
Автор

Great job! I really like all the extra little touches you added. Thanks for explaining your code.

keithlohmeyer
Автор

Nice project and nice production quality on the video. Well done.

paulmcwhorter
Автор

Thanks for posting...still digesting the parameter.

zaneenaz
Автор

Well done Ian.!!

Is the input for your Python program like this ?:
int potPinBl = A0;
int potPinGe = A1;
int potPinRo = A2;

int potValBl;
int potValGe;
int potValRo;
int DL = 100;

void setup() {
pinMode(potPinBl, INPUT);
pinMode(potPinGe, INPUT);
pinMode(potPinRo, INPUT);

Serial.begin(115200);

}

void loop() {
potValBl = analogRead(potPinBl);
potValGe = analogRead(potPinGe);
potValRo = analogRead(potPinRo);

Serial.print(potValBl);
Serial.print(':');
Serial.print(potValGe);
Serial.print(':');
Serial.println(potValRo);
delay(DL);
}

The reason I ask, is that I only get one meter working.
In the serial monitor I see (f.e.) 92:42:131 (depending on the pot position)

Thanks in advance.
Greetings Henk

henkoegema
join shbcf.ru