SERIAL_9N1 was not declared in this scope #10
-
I try to compilate the sketch and I copied the HardwareSerial9bit" or "NewHWSworking" to the library directory but still I get the error: What is going wrong? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 2 replies
-
Hi Fietsenwiel, Did you try this with versions shown in documentation? Regards, |
Beta Was this translation helpful? Give feedback.
-
I tried both. |
Beta Was this translation helpful? Give feedback.
-
No, that's not a solition. The 9 bit protocol is necessary to communicate to Seatalk. It has to compile with SERIAL_9N1. Please change IDE and Board setup until it compiles without error. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your support so far. But I still don't understand. I compiled first with the board Leonardo , first with "HardwareSerial9bit" and then with "NewHWSworking" in the library directory. Board info says: |
Beta Was this translation helpful? Give feedback.
-
Maybe I have to include something? |
Beta Was this translation helpful? Give feedback.
-
I now put the files of the "HardwareSerial9bit" directory with the ino file. And when I try the files in "NewHWSworking" than I get the error: prototype for 'void HardwareSerial:begin(long unsigned int,...... in the line: void hardwareSerial::begin(unsigned long baud, uint16_t config) I now have no idea to get this working.... |
Beta Was this translation helpful? Give feedback.
-
Thanks, "For the Leonardo board please use the Arduino AVR Boards version 1.8.3 " did the trick. Now I will put the components together, can't wait to see the magic. |
Beta Was this translation helpful? Give feedback.
-
Hi there, what am I getting wrong, what have I done wrong? |
Beta Was this translation helpful? Give feedback.
-
Dear Andreas,
thank you very much for your reply!
I copied these 3 files into the
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\HardwareSerial9bit
folder, and the .ino file left alone.
The following error message is displayed during compilation:
Arduino: 1.8.10 (Windows 10), Board: "Arduino Leonardo"
C:\Users\LászlóJánoky\Arduino\SeaTalk_Autopilot\SeaTalk_Autopilot.ino: In function 'void setup()':
SeaTalk_Autopilot:153:24: error: 'SERIAL_9N1' was not declared in this scope
C:\Users\LászlóJánoky\Arduino\SeaTalk_Autopilot\SeaTalk_Autopilot.ino:153:24: note: suggested alternative: 'SERIAL_8N1'
Arduino IDE 1.8.10
Board: Arduino AVR Boards Leonardo 1.8.3
I don`t know what else I van do wrong… :(
best regards
Laszlo JANOKY
On 2023. Mar 1., at 14:40, Andreas Koritnik ***@***.***> wrote:
The three files from "HardwareSerial9bit" (or "NewHWSworking" for older IDE) have to be copied into the Arduino directory on your local PC e.g.: "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino". Not to the directory with the .ini file. This is only tru for Windows sytems!
—
Reply to this email directly, view it on GitHub<#10 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWOMVSENMWS7VYA7XPTIPBTWZ5GVHANCNFSM5TCY2TDQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Dear Andreas,
I figured it out: replace the original (default) HardwareSerial* files with the ones in the repo :)
regards
LJ
On 2023. Mar 1., at 14:40, Andreas Koritnik ***@***.***> wrote:
The three files from "HardwareSerial9bit" (or "NewHWSworking" for older IDE) have to be copied into the Arduino directory on your local PC e.g.: "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino". Not to the directory with the .ini file. This is only tru for Windows sytems!
—
Reply to this email directly, view it on GitHub<#10 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWOMVSENMWS7VYA7XPTIPBTWZ5GVHANCNFSM5TCY2TDQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I can't re-produce your problems. My only advise now is to try it with a clean install of the IDE: https://forum.arduino.cc/t/uninstall-for-a-fresh-re-install/349503 After a clean install, copy the tree files again to the folder. |
Beta Was this translation helpful? Give feedback.
Thanks, "For the Leonardo board please use the Arduino AVR Boards version 1.8.3 " did the trick.
Now I will put the components together, can't wait to see the magic.