SparkFun Forums 

Where electronics enthusiasts find answers.

General MicroView Support area - You have questions, find your answers here.

Moderators: marcus@geekammo, Help@GeekAmmo

By davew
Hi all,

My original problem arose when I added widget code to DS18B20 demo code. The Serial Monitor started showing garbage. Testing the Microview demos with Serial Monitor added produced mixed results, until I noticed that the placement of the Serial.begin in Setup made a difference.

Placing it before the uView.begin() is a problem, placing it after is OK!!

I'm not an expert programmer, but I'm guessing that uView.begin() is messing up interrupts or timers.

Sample code based on the Cube demo is here (paste the setup() and loop() into the original):
Code: Select all
Rotating a 3-D Cube on the MicroView Display
Jim Lindblom @ SparkFun Electronics
Original Creation Date: June 9, 2014
#include <MicroView.h>

// code cut for brevity

void setup()
  Serial.begin(9600);  // Serial.begin here causes garbage in Serial Monitor

// Serial.begin(9600);  // Serial.begin here and Serial Monitor is OK

void loop()
Serial.println("hmmm ");

// Draw cube removed... paste the setup() and loop() into the original MicroViewCube demo
By Help@GeekAmmo
Hi Davew,

If you update the MicroView library, this should be fixed. The previous version of the library declared Serial.begin(115200) inside uView.begin() to be used by checkComm(), we found out that this is not a good way, and then removed the Serial.begin(115200) from uView.begin().

This explains why your Serial.begin(9600) works after uView.begin().

Hope this helps

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]