Hola!
I've been faced one problem on the start of learning Leonardo! There's no output to port monitor window! Please tell me why the script doesn't work?
All USB ports (2.0) where tested all kind of USB-cables I've got where tested (various length)...
But the problem still exists!
I've searched about two days whole Internet including the forum, but there's no solution to solve it...
Windows 8 32-bit. Installed propperly on COM3. LED blinking on the board gives me hope the board is alive...
Thank You all for answers.
I will answer all questions to me first.
"Why you use Serial.write()? Why not Serial.println()?"
There's no difference (I know functions have different actions) to my state 'cause there are no output with "write" nor "println"...
"The Leonardo has a special serial start setup not needed with the arduinos." Ok. I know it. And in the code above I place "special piece of code".
"What baud rate have you got the Serial monitor window set to?" I think that there's no difference 'cause output is not present on any baudrate I had setted. By default COM4, Port Monitor have 9600 and in code I use Serial.begin(9600). When I change baudrate synchronously the blank window stays not changed every time after reset or uploading code...
"Incidentally, code laid out like that is difficult to read. It is much better to write" Thank You. You are right. I just type briefly to show whole code only in less strings... To be not banned for overquoting and not using spoilers
Let me ask you now...
luisilva: "in my system your sketch is working." -I know that the code should be workin' cause I new to Arduino but experienced to C++... There's no reason to not working
Let me asking - Have you tested on Leonardo board?
I would like to ask You to show a whole code (to copy/paste) to test with internal LEDs... Is it possible? Or maybe a link to test not in IDE but on board itself. To check the board
I would like to ask You to show a whole code (to copy/paste) to test with internal LEDs... Is it possible? Or maybe a link to test not in IDE but on board itself.
// zoomkat 8-6-10 serial I/O string test
// type a string like on or off in serial monitor. then send or enter
// for IDE 0019 and later
int ledPin = 13;
String readString;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
Serial.println("serial on/off test 0021"); // so I can keep track
}
void loop() {
while (Serial.available()) {
delay(3);
char c = Serial.read();
readString += c;
}
if (readString.length() >0) {
Serial.println(readString);
if (readString == "on")
{
digitalWrite(ledPin, HIGH);
Serial.println("LED on");
}
if (readString == "off")
{
digitalWrite(ledPin, LOW);
Serial.println("LED off");
}
readString="";
}
}
this is on pin13 measurement voltage about 5 V drops to 0 V then jumps to about 5 V and so on
I know that's not a program related but... Seems to me my board doesn't accept any code...
Why my board switched off and then on during uploading code? Is this correct behavior?
Your original code works on my Leonardo. Using Arduino 1.0.6 and Xubuntu 14.04. (Incidentally 1.5.6 did not want to program the Leonardo).
Are you aware that you have a 10 second delay between the words - I assumed it was 1 second and thought it was not working.
The Leonardo can be a bit troublesome because it restarts the serial connection when it resets so you need to check that the serial monitor is using the correct one.
UKHeliBob. Thanks for advice, but the answer - not. And you know why? Because I've been installed 3 OS (Windows XP 64 bit, Windows 8.1 32 bit and xubuntu 14.04 64 bit) in VirtualBox. In main OS (Windows 7 64 bit) and virtual OSs I installed Arduino IDE with drivers and jre if needed.
In all OSs the same problem - I can not upload scetch. I will be more accurately when say that I can not understand what happens to IDE and the board because a process of uploading finished RX had been blinking and after all - there's no response and any output in port monitor...
Robin2. I've been surprised when first time install linux and find it more reliable in case of hardware like Leonardo cause there's no f***ing spell-casting over unsigned drivers and stupid OS restrictions.
Not one of 3 Windows (7, 8, XP) lets me install IDE and start working... I may write how I tried to install driver under Windows 7 and XP or finding missin usbser for a long time but the fact lunux gave me way to focus on writing scetch...
Please, don't suspect me in holy war (linux vs windows)
Try another USB port on the PC.
Try connecting through a USB hub with its DC power supply connected to ensure 500mA supply.
Try on another PC with a simpler OS setup.
Try installing the latest version of the IDE.
PTRVOID:
Ok, may I ask You to watch short film on Youtube
I lost patience ...
What version of the Arduino IDE are you using. As I mentioned in Reply #8 1.0.6 worked with the Leonardo for me but 1.5.6 did not. I did not explore why.
You might also check what version of Java is on your PC (java -version)
Robin2
"Glad you like Ubuntu - drivers? what are they?"
Forget! Maybe I use messy phrase - all I want to say there's no annoying unsigned driver problem like in Windows. But I admit that MAYBE the unsigned-driver-problem is only on my machine I won't dispute on it...
I will try other versions of IDE...
"I lost patience ..."
I beg you pardon. That's not a goal. I just wanted to show whole process to be pointed on my mistakes if any... And cause I'm not a native english speaker I have needed additional time to add subtitles...
Did I understood you right, you cannot upload sketches to the Leonardo?
I have Micro, same processor, and I need to keep it resetted while the upload starts, then stop resetting when the upload has started. I dont know if Micro and Leonardo behaves the same way there
.