New answers tagged

-1

As the bytes sent by Raspbian is encoded in UTF-8, use the following line in order to avoid a strip() at a later-on stage: temp = ser.read(bytestoread).decode('utf-8')


2

The driver board for your "Lasersaur" appears to be based around the Adafruit Trinket Pro. That board, on Adafruit's website, is deprecated, with the following warning: Deprecation Warning: The Pro Trinket bit-bang USB technique it uses doesn't work as well as it did in 2014, many modern computers won't work well. So while we still carry the Pro Trinket ...


2

I have solved the above and will share the answer as it may be of help to others: As the Tx indicator LED on the RS232 shield would not light up when connected to the sensor, I checked the voltage difference between pin 2 (Tx) and pin 5 (GND) of the RS232 connector. This turned out to be only 5V, indicating that the protocol used is TTL-RS232 rather than '...


0

VE7JRO already has answered your question. Below is not an answer to the question but a better way to program something like you have. In your case, you need to set 5 pins according. I assume the following lines are just for initialization (and not needed when you set them afterwards to FALSE), as I do not see any delay. digitalWrite(Ledpin1,HIGH); ...


1

One reason you are receiving the compile error, is due to the code outside of a function. When you write nice, neat, properly formatted code, these errors are easy to spot. The Arduino IDE has a built in feature that will "highlight" a matching curly bracket (or curly brace?).


3

This is because the output of the serial is buffered. It's still sending the first bit of data while you change the baud rate - and from then on it's just a complete mess. You need to force it to finish sending before you can change the baud rate by using Serial.flush(): void setup() { Serial.begin(115200); Serial.println("Hello"); Serial.flush(); } ...


3

The whole concept of Baud Rate with USB communication is completely meaningless. There is no such thing as "baud rate" over USB. What there is, and what you are confusing with "baud rate" is a configuration item which the host can send to the device which is a "I would like you to communicate with other devices at this speed" configuration item. This is ...


0

Just a theory for 2: The text that shows up in the Tools > Port list after the COMx eg Tools -> Port -> COM3(Arduino Mega or Mega 2560) is simply what the IDE thinks the board is based on the USB ID (VID/PID) of the board's USB interface chip. For some clones, this is blank because they don't even use the same chip as an authentic Uno. In your case, ...


1

Sorry, my question was not easy to understand. Your solution had not worked for me. I found another libary where its possible to add the parity bit: https://github.com/ledongthuc/CustomSoftwareSerial This works fine for me. Thanks for your help :)


0

If I understand you right: You changed the UART settings on the HC05 module and now you are unable to connect to the HC-06. You use SoftwareSerial for the connection as on an UNO you have only one HardwareSerial port. SoftwareSerial only allows to configure the baud rate. There are work arounds https://forum.arduino.cc/index.php?topic=251764 , but you can ...


0

Here is a good documentation: https://lastminuteengineers.com/sim800l-gsm-module-arduino-tutorial/ -- Did you add a voltage divider to the RX pin? If Arduino drive 5 Volt to the module's pin, the module might be destroyed. The module has an automatic baud rate detection, so 115200 baud should be OK. Do you configured your terminal with 115200 baud for ...


2

If the provided source is cut down to the lines that have to do with the temperature, it is just this. If you try this sketch it should behave equally "wrong": const int sensor = A5; int tempc; float vout; void setup() { vout = analogRead(sensor); pinMode(sensor, INPUT); } void loop() { lcd.print(tempc); tempc = (vout * 500) / 1023; } In ...


Top 50 recent answers are included