Announcement

Collapse
No announcement yet.

Arduino 1.0 - Serial.print(BYTE) or Serial.write()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sspence65
    replied


    Ok, I worked out the three areas that could be issues for Arduino 1.0:

    Serial3.print(byte(00)); //terminator
    becomes
    Serial3.write((uint8_t)0); //terminator

    Serial3.print(byte(y)); //color
    becomes
    Serial3.write(y); //color

    and

    Serial3.print(int(z)); //data
    stays the same

    Leave a comment:


  • sspence65
    started a topic Arduino 1.0 - Serial.print(BYTE) or Serial.write()

    Arduino 1.0 - Serial.print(BYTE) or Serial.write()

    In Arduino 0023, I talk to my uvga (sgc) as follows:

    HTML Code:
    sendDesc(35, 7, 3, 255, 255, "Moveable 1725");  
    
    byte sendDesc(int u, int v, int w, int x, int y, char* z) {
    
    Serial3.print(byte(115)); //command
    Serial3.print(byte(u)); //column
    Serial3.print(byte(v)); //row
    Serial3.print(byte(w)); //font
    Serial3.print(byte(x)); //color
    Serial3.print(byte(y)); //color
    Serial3.print(z); //string
    Serial3.print("         "); // to delete remaining numbers from previous measure
    Serial3.print(byte(00)); //terminator
    a = nacAck();
    
    }
    But in Arduino 1.0, Serial.print(BYTE) has been changed to Serial.write()

    Not getting my head around this. Is it really that simple? Just replace all above occurrences of Serial3.print(byte with Serial3.write and drop the last )? Even the terminator (00)?
Working...
X