Shown below is the beginning of the program to operate 16X2 serial TTL display, (Adafruit #784)
(This was copied and pasted into sketch)
1.#include <SoftwareSerial.h>
2.
3.
4.// Create a software serial port!
5.SoftwareSerial lcd = SoftwareSerial(0,2);
6.
7.void setup() {
8. lcd.begin(9600);
9.
10. // set the size of the display if it isn't 16x2 (you only have to do this once)
11. lcd.write(0xFE);
12. lcd.write(0xD1);
13. lcd.write(16); // 16 columns
14. lcd.write(2); // 2 rows
15....etc........
When I compile these are the errors I get? (the SoftwareSerial library is installed.)
display:3: error: stray '#' in program
display.ino:7:1: error: invalid suffix "SoftwareSerial" on floating constant
display.ino:9:1: error: invalid suffix "void" on floating constant
display.ino:71:1: error: invalid suffix "uint8_t" on floating constant
display.ino:72:1: error: invalid suffix "void" on floating constant
display:3: error: expected unqualified-id before numeric constant
display:8: error: expected unqualified-id before numeric constant
display:70: error: expected unqualified-id before numeric constant
display:72: error: expected unqualified-id before numeric constant
Is there a bug with the program on the Adafruit site for this serial program?
Serial software compile errors with Aduino Uno
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 1
- Joined: Fri Apr 04, 2014 10:15 am
- Franklin97355
- Posts: 23940
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Serial software compile errors with Aduino Uno
Look for it and if you can't find it post your actual code (betweenerror: stray '#' in program
Code: Select all
tags here and we will see what we can find.
- Renate
- Posts: 291
- Joined: Tue Nov 13, 2012 3:21 pm
Re: Serial software compile errors with Aduino Uno
Um, those numbers 1-15 aren't actually in your file, are they?
A listing might have those numbers visible, but they are not part of the the actual code.
Either copy a raw listing or edit them out.
A listing might have those numbers visible, but they are not part of the the actual code.
Either copy a raw listing or edit them out.
Please be positive and constructive with your questions and comments.