Go Down

Topic: No peek() with ATmega644? (Read 1 time) previous topic - next topic

JanD

Hello,

I got the compiler error for a sketch that peek() in class hardware serial was not defined. I looked into the core files of for the ATmega644 (non-P) from the Sanguino.cc webside and: There was no peek(). Is there a way to implement this? Or is there another way?

Jan

westfw

The versions of the Arduino libraries that was modified to support the 644 pre-dates the addition of Serial.peek()
It should be pretty easy to add, but I think the whole HardwareSerial support has been re-written at least once since then, so it won't quite be trivial.

Coding Badly


JanD

I haven't thought of using these core files (why; i don't know) but I used them instead.

So no the error with peek() is gone. The code uploades. But I can't see anything on the LCD connected?!

What's happening now?

Jan

JanD

Would it perhaps help if I copied the peek() function from the core files from avr-deverlopers into the sanguino core files?

I will try that tomorrow.

Jan

Go Up