Skip to content

Re #241

Answered by zicez
zicez asked this question in Q&A - Tinymovr
Re #241
Mar 10, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

You're right. I didn't properly get the Serial port set up correctly. The board is working now. Using an arduino nano 33 to run this.

const int bufferSize = 6;
void setup() {
  // start serial port
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);
  Serial.begin(9600);
  Serial1.begin(115200);
  while (!Serial) {
    ;  // wait for serial port to connect. Needed for native USB port only
  }
}

void loop() {
  // if we get a byte
  if (Serial.available() > 0) {
      Serial1.write(Serial.read());
  }
  if (Serial1.available() > 0) {
    //Create a place to hold the incoming message
    static char message[bufferSize];
    static unsigned int message_pos = 0;
    while (Seri…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@yconst
Comment options

@yconst
Comment options

@zicez
Comment options

Answer selected by yconst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants