Go Down

Topic: add a test area (Read 807 times) previous topic - next topic

jerryb

adding a test area would allow someone to test adding code and images

thanks

like this


yeaa after 6 trys I got it!

now how to insert code?


Code: [Select]
#include <SoftwareSerial.h>
// if you myserial.print and get garbage tect try this.
// not all LCD's run at the expected speed use this to test yours

#define rxPin 4  // rxPin is immaterial - not used - just make this an unused Arduino pin number
#define txPin 12 // pin 12 is analog pin 0, on a BBB just use a servo cable :), see Reference pinMode
SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);
// mySerial is connected to the TX pin so mySerial.print commands are used
// one could just as well use the software mySerial library to communicate on another pin


int baud=300;// starting point

void setup()
{
  pinMode(rxPin, INPUT);

  pinMode(txPin, OUTPUT);
  mySerial.begin(4800);      // maybe it is maybe it isn't

  delay(1000);               // pause to allow LCD EEPROM to program
   mySerial.print("?f");
   mySerial.print("LCD117");
   mySerial.print("it is about");
   mySerial.print("time");
   delay(1000);
   
       
}

void loop()
{
 
 mySerial.begin(baud);      // test each speed

  delay(4000);               // pause to allow LCD EEPROM to program
   mySerial.print("?f");
   delay(4000);
   mySerial.print("baud= ");
   mySerial.print(baud);
   delay(4000);
   mySerial.print("?f");
   delay(200);
   baud = (baud*2); // increae baud until readable

 
}


ok that works


PaulS

You know there is a Preview button next to the Post button, right? That show what your post is going to look like when you press the Post button.

Go Up