SparkFun Forums 

Where electronics enthusiasts find answers.

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

Moderators: Help@GeekAmmo, marcus@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