- Mon May 15, 2017 2:50 am
#194862
Hi All.
I'm using a Pro Micro with the ATmega32U4 (5V, 16MHz) microprocessor and built-in USB programmer.
This is the one I have:
http://cgi.ebay.co.uk/ws/eBayISAPI.dll? ... 2374507509
which is a clone of:
https://www.sparkfun.com/products/12640
QUESTION 1
I have tested with two setups:
1) Windows driver (in Windows device manager) is using Arduino Leonardo driver. IDE is compiling code for Arduino Leonardo board. This is the default plug-and-plug and works out of the box.
2) Windows driver is updated to use SparkFun Pro Micro driver. IDE is compiling code for SparkFun Pro Micro 5V board. This is the recommend setup (I guess) according to this guide: https://learn.sparkfun.com/tutorials/pr ... okup-guide
Both of these methods are working for a simple serial example with a flasing LED
I am not sure why I should not just use the Leonarder programmer? Why install the additional drivers?
QUESTION 2
I cannot get a correct data flow when using Serial1. This is my simple sample code, where I am testing both Serial write and print.
However, My data is looking like below. Seems like my encoding is not correct? My baud rate is correct. What can be the issue? I have tested with 2 very different rs232 to usb. I connect TX -> RX and RX -> TX as well as a common GND.
I'm using a Pro Micro with the ATmega32U4 (5V, 16MHz) microprocessor and built-in USB programmer.
This is the one I have:
http://cgi.ebay.co.uk/ws/eBayISAPI.dll? ... 2374507509
which is a clone of:
https://www.sparkfun.com/products/12640
QUESTION 1
I have tested with two setups:
1) Windows driver (in Windows device manager) is using Arduino Leonardo driver. IDE is compiling code for Arduino Leonardo board. This is the default plug-and-plug and works out of the box.
2) Windows driver is updated to use SparkFun Pro Micro driver. IDE is compiling code for SparkFun Pro Micro 5V board. This is the recommend setup (I guess) according to this guide: https://learn.sparkfun.com/tutorials/pr ... okup-guide
Both of these methods are working for a simple serial example with a flasing LED
I am not sure why I should not just use the Leonarder programmer? Why install the additional drivers?
QUESTION 2
I cannot get a correct data flow when using Serial1. This is my simple sample code, where I am testing both Serial write and print.
However, My data is looking like below. Seems like my encoding is not correct? My baud rate is correct. What can be the issue? I have tested with 2 very different rs232 to usb. I connect TX -> RX and RX -> TX as well as a common GND.
Code: Select all
void setup()
{
Serial1.begin(9600);
}
void loop()
{
Serial1.write("A");
Serial1.flush();
Serial1.write(10);
Serial1.flush();
Serial1.print("A");
Serial1.flush();
Serial1.print(10);
Serial1.flush();
Serial1.println("A");
Serial1.flush();
Serial1.println(10);
Serial1.flush();
delay(1000);
}