Aktywne Wpisy

frugASS +197
Treść przeznaczona dla osób powyżej 18 roku życia...

Tak się patrzy na mnie moja wątroba kiedy otwieram szóstego harnasia
#heheszki #humorobrazkowy #alkoholizm
#heheszki #humorobrazkowy #alkoholizm
źródło: temp_file2019701003094698912
Pobierz




mam problem z #arduino oraz z modulem bluetooth HC-06.
Podłączyłem według tego schematu:
- youtube
- youtube
komendy "AT" dzialają, tzn (czasami dzialają czasami nie, w zależności jak szybko wpisuje):
- jak wysle AT to dostaje OK
- jak wyśle AT to dostaje BT3.0-2022.10.25
Boud ustawiony jest na 9600;
Porblem jest po połaczeniu z telefonem (Android 12) i aplikacją, Oczywiscie kod dopasowany:
- wysylanie nie dziala
- odbieranie nie dziala
#include <SoftwareSerial.h>
const byte rxPin = 8;
const byte txPin = 9;
SoftwareSerial BTSerial(rxPin, txPin); // RX, TX
void setup() {
Serial.begin(9600);
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
// scanBaudrate();
BTSerial.begin(9600);
delay(1000);
Serial.println("ENTER AT Commands:");
}
String messageBuffer = "";
String message = "";
void loop() {
while (BTSerial.available() > 0) {
char data = (char)BTSerial.read();
messageBuffer += data;
if (data == ';') {
message = messageBuffer;
messageBuffer = "";
Serial.print(message); // send to serial monitor
message = "You sent " + message;
BTSerial.print(message);
}
}
}
wtedy kod wygląda inaczej:
void loop() {// put your main code here, to run