Hot answers tagged

2

int checkSum[] = {-1, -1}; const String stringPool[] = { "Satz 1", "Satz 2", "Satz 3", "Satz 4", "Satz 5", "Satz 6", "Satz 7", "Satz 8", "Satz 9", "Satz 10", "Satz 11", "Satz 12" }; const String& chooseRandom () { bool isMaybeThreeTimes; int randomInt; ...


2

Use an USB to TTL Serial adapter. Wire it to one of the RX/TX pin pairs and in code use the corresponding Serial object Serial1, Serial2 or Serial3. Don't forget to wire Ground. You can use some terminal program or Serial Monitor in Arduino IDE to communicate over the adapter. You can open a second instance of the Arduino IDE by starting it with the ...


1

Since all of these cheap fingerprint readers are similar you can find a compatible datasheet and just find the commands and descriptions there. However, I couldn't find a datasheet that would include a good description of the protocol. So the other option is to look at the protocot through the software SFGDemo which is apparently capable of getting an image ...


1

As @Juraj mentioned, if it's enumerating as a serial port, the atmega16u2 is fine. You may be able to replace the atmega328p/au. It will take some doing; you'll need to remove the chip, insert a new one, and use another Arduino as an ArduinoISP to program the bootloader into your new blank atmega328p. Any chance you might have uploaded a sketch that is ...


1

I can not comment, it turns out that this example that you are working is not very suitable, since the RX and TX are directly connected to the USB connection (for Arduino UNO), that is, you can only use these pins as long as it is loaded from Sketch uses An external power supply to connect the Arduino, my recommendation is to work if you have a sensor to ...


1

Your code would be a lot easier to read and find mistakes in if you formatted it. I see that you did that in the IDE, but in your question, you need to highlight all of the code, then click the "{}" button to make it look like code in your question. When I pasted your code into my IDE and auto-formatted it, the answer was immediately clear: after the ...


1

You're sending your lightval twice - once as a textual representation of the number, and once as a character representing the lower 8 bits: Serial.println(lightval); Serial.write(lightval); For example: Q308 R304 Q306 If you take the 308 and AND it with 255 you get 52. 52 as an ASCII character is R. So you print 308, including a newline, then you print ...


1

It depends actually on your requirements what is 'best'. If (transmission) speed is an issue, there are mainly some things you can do to improve this: Increase the transmission speed (this depends on the distance of the wires and the noise). Decrease the start/stop bits (this reduces the certainty the values will arrive ok) Pack your data (takes more ...


1

Please take a look at the documentation of SerialEvent. This might be exactly what you are looking for (after several small tweaks) Code from the example: /* Serial Event example When new serial data arrives, this sketch adds it to a String. When a newline is received, the loop prints the string and clears it. A good test for this is to try it ...


1

I have figured it out There seem to be understandable limitations if what kind of function can be run as a result of asynchronous scanning (which doesn't seem to interrupt running of a loop function) So if I have used delay(x) or a while loop until there is input on serial, MCU resets after allotted time runs out. I have re-written code to start function ...


1

Ok i found the issue and the solution. For some reason it seems that while the MCU is running Setup(); hardware or software serial don't work properly. In my case i have code that set the SIM module to SMS mode and to send those messages to the serial port. For some reason it doesn't send them (or probably the module is not ready to accept them). ...


1

Well, I was able to resolve it, but I’m not sure how. After going through the steps I’ve outlined in my replies to answers here, I tried buying a new Arduino Uno R3, but that didn’t fix anything either. My last step was to do a Windows “Reset” which reinstalls Windows while keeping files but resets settings and programs. After reinstalling and adding back in ...


1

I would check if the arduino you are using supports your selected baudrate. 38000 is not a standard rate and it could be, that the hardware is not able to work at it with the needed precision. The software serial (and most USB serial dongles) could use any baudrate, but not the limited hardware within most arduinos.


Only top voted, non community-wiki answers of a minimum length are eligible