RoboRemo Users' Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

why start serial with 115200 baud

2 posters

Go down

why start serial with 115200 baud Empty why start serial with 115200 baud

Post by jan99 Mon May 25, 2020 10:18 am

hi !

i have a Question About https://www.roboremo.com/projects/arduino/arduino-bluetooth-l298n

there will be write

Code:
 delay(500); // wait for bluetooth module to start

  Serial.begin(115200);
  // My Bluetooth default baud is 115200
  // If your Bluetooth uses other baud rate,
  // then you must modify it here,
  // otherwise it will not work.
  // for HC-05/06 it is usually 9600
 
  pinMode(EN_1, OUTPUT);

i understand that is required to Change the baud depend to use Bluetooth device - but why you start

Code:

  Serial.begin(115200);

why not direct by 9600?

regards Jan

jan99

Posts : 20
Join date : 2019-10-27

Back to top Go down

why start serial with 115200 baud Empty Re: why start serial with 115200 baud

Post by Admin Tue May 26, 2020 7:24 pm

You probably mean the code where I switch the baudrate:

Code:

bluetooth.begin(115200); // Bluetooth default baud is 115200
bluetooth.print("$");
bluetooth.print("$");
bluetooth.print("$"); // enter cmd mode
delay(250); 
bluetooth.println("U,9600,N"); // change baud to 9600
bluetooth.begin(9600);


Yes, that is confusing and I must change it or explain better, sorry Smile

I used the BlueSMiRF module with default baud rate of 115200 and the command "U,9600,N" was TEMPORARLY changing it to 9600. This way the code is compatible with both BlueSMiRF and (some) HC-05 that default to 9600.

Of course if you use a specific module, you can use directly its baudrate.

Regards,
Victor

Admin
Admin

Posts : 150
Join date : 2016-03-08

https://roboremo.forumotion.com

Back to top Go down

why start serial with 115200 baud Empty Re: why start serial with 115200 baud

Post by jan99 Tue May 26, 2020 10:40 pm

post in wrong article!

Sad

Jan

jan99

Posts : 20
Join date : 2019-10-27

Back to top Go down

why start serial with 115200 baud Empty Re: why start serial with 115200 baud

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum