Correction – Declare var ahead

Correction

It was s working – getting data & interacting with potentiometer to show city, country, and temperature.

Problem : However all the display was keep blinking.The problem came from the fact that i was drawing everything under void serialEvent I fixed it by declaring the variable that i use to communicate with potentiometer at the top of the sketch(A), so i can call the same variable under draw function(B).In this way my code under void serialEvent became cleaner(C).

A.  Declared variable inByte at the top of the sketch

B. then i used same variable under draw funtion

C. my void serialEvent(Serial myPort){}  got simpler.

Advertisements

Comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s