Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Problems with CyberLib on new Arduino
JonM
Newbie
Posts: 9
Permalink
Post Problems with CyberLib on new Arduino
on: June 26, 2014, 02:17
Quote

Hey Chris

Trying out a different Arduino and getting the error below. Was working before on Arduino Uno R3. I will try it again on the R3 later today. Ran through the installation tutorials for libraries, try it a couple of times. Ran through the 'In function' info as well, no luck. Other sketches which don't use the CyberLib work. Have you seen this error before? Or possibly know what might be the problem.

C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp: In function 'void UART_Init(uint32_t)':
C:Arduino\libraries\Cyberlib_1\CyberLib.cpp:26: error: 'UBRR0H' was not declared in this scope
C:Arduino\libraries\Cyberlib_1\CyberLib.cpp:27: error: 'UBRR0L' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:28: error: 'UCSR0A' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:28: error: 'U2X0' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:29: error: 'UCSR0B' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:29: error: 'TXEN0' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:29: error: 'RXEN0' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:30: error: 'UCSR0C' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:30: error: 'UCSZ01' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:30: error: 'UCSZ00' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp: In function 'void UART_SendByte(uint8_t)':
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:35: error: 'UCSR0A' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:35: error: 'UDRE0' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:36: error: 'UDR0' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp: In function 'bool UART_ReadByte(uint8_t&)':
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:41: error: 'UCSR0A' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:41: error: 'RXC0' was not declared in this scope
C:\Arduino\libraries\Cyberlib_1\CyberLib.cpp:43: error: 'UDR0' was not declared in this scope

Cheers
Jon

Chris@Chro-
nos
Administrator
Posts: 137
Permalink
Post Re: Problems with CyberLib on new Arduino
on: June 26, 2014, 15:58
Quote

Did you restart the program after reinstalling the library?....

it sounds like it is finding the library.... this is Genuine Arduino R3 not a knockoff? Also confirm which version of Arduino IDE you are using?

JonM
Newbie
Posts: 9
Permalink
Post Re: Problems with CyberLib on new Arduino
on: June 27, 2014, 02:39
Quote

Yep, tried that one.
Have even uninstalled and reinstalled the entire program, and reinstalled the CyberLib into the Libraries folder.

Strange thing is it was working a couple of weeks ago, when uploading code, and even though no changes to it, just keep getting the same error.
Without the Arduino connected, I ran the compiler to check the code, and that seems to be where the error originates

It does show up in the IDE list of libraries (both in file explorer and within the in-built menus)
Even with no real program, and just importing CyberLib into a blank sketch gives the same result on compile. So I agree it seems like its not finding it, or something weird along that way.

Tried with the Arduino IDE 1.0.5
and also IDE 1.0.1

Genuine Arduino R3, same as the one that was working a couple of weeks ago (although previous one is acting a bit weird now).

I am stumped on the sudden change for no apparent reason.

JonM
Newbie
Posts: 9
Permalink
Post Re: Problems with CyberLib on new Arduino
on: June 27, 2014, 02:49
Quote

Just on the off chance, I reset the board choice to Arduino Uno, after trying on a different board. The code compiles with no errors now for the UNO.
Seems like Sparkfun has made some change to the new Arduino, which has issues with the CyberLib file.

New Arduino is running ATMEL Mega32u4
R3 has a ATMEL Mega328P on it.

Did read something about baud rate was related to void_UART errors. Not sure if this is the issue.

Chris@Chro-
nos
Administrator
Posts: 137
Permalink
Post Re: Problems with CyberLib on new Arduino
on: June 30, 2014, 17:58
Quote

Is that an Arduino Uno R3? or Arduino Leonardo R3?

the Leonardo R3 has a smaller USB port and uses that 32u4 chip

JonM
Newbie
Posts: 9
Permalink
Post Re: Problems with CyberLib on new Arduino
on: July 1, 2014, 06:35
Quote

The new one is official Arduino with 32u4 instead of the 328 chip. Definitely seems to be some issue with the CyberLib file.
Not sure why it would have an issue, should run like a Uno R3, except the initial setup is a little different.
Does have the micro-USB port similar to most Android phones. So perhaps the baud-rate is an issue after all. Will see if I can change it to whatever makes it suitable.
Has to be something in the communication protocol.

JonM
Newbie
Posts: 9
Permalink
Post Re: Problems with CyberLib on new Arduino
on: July 1, 2014, 07:37
Quote

Didn't realise I had it with me, so was able to test this out.
Sadly, no luck when changing the baud-rate on the sketch and for the COM port.
Its an error yes, but not a very useful one to find the cause.

JonM
Newbie
Posts: 9
Permalink
Post Re: Problems with CyberLib on new Arduino
on: July 9, 2014, 02:28
Quote

Figured it out. Wasn't baud rate. Had to go digging for it in the code for a few hours, and then at the last moment when I was about to give up on it for the time being. It jumps out at me.
Compiling is all good.
But sketch size is a little large as the 32u4 loads extra USB protocols.
So need to get 32,918 bytes, down to 28,672 bytes.
That will be tough because you packed so many outstanding features into the program Chris.

Pages: [1]
The Chronos Project | Time Lapse Motion Control
©2013