Skip to main content
10 votes

How do I print multiple variables in a string?

I only use this for debugging but: int a = 10; int b = 20; Serial.println("a = " + String(a) + " and b = " + String(b));
linhartr22's user avatar
3 votes
Accepted

Arduino Serial to USB=>serial data issue

You need to be careful. Normal devices that have a "Serial" interface actually have an RS232 interface. While the data transmission scheme is similar with the "Serial" interface on ...
chrisl's user avatar
  • 16.6k
3 votes
Accepted

Baudrate is set to 9600 automatically even if specifying a different value

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 ...
Majenko's user avatar
  • 106k
3 votes

Emulating a generic Mifare USB peripheral device with RFID-RC522

You have to use Arduino Mini and Keyboard.h library which comes with arduino IDE. Arduino Nano does not have HID capable processor. Try this with mini: #include <Keyboard.h> void setup() { /...
Marko Solomun's user avatar
3 votes

How do I print multiple variables in a string?

One possible solution is: Serial.println((String)"Var 1:" + var1 + " Var 2:" + var2 + " Var 3:" + var3); The above solution from Iain increases code size.
Iain Crawford's user avatar
3 votes

How do I print multiple variables in a string?

I am newbie in Arduino world, but I recently found that this is just a regular C++ (without exceptions and probably polymorphism). But you still can enjoy templates. So my solution is to use following ...
user270049's user avatar
2 votes

How do I print multiple variables in a string?

The usage will depend of the data type of your variables. If they are int, it would be %d or %i If they are string, it would be %s Wrapper for printf You can change the limit based on your ...
Remi's user avatar
  • 159
1 vote

avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

The Arduino Nano 33 BLE Sense Rev2 does not use an ATmega328P microcontroller like the ordinary Nano. It has an nRF52840 ARM Cortex-M4 microcontroller. That’s why your avrdude command is failing—...
liaifat85's user avatar
  • 251
1 vote

Communicating via Serial Monitor but not able to get comms via Terminal outside of Arduino IDE

In TeraTerm the local echo is off by default. So you won't see anything while you type something. Here are the settings: First connect to the serial port. Then go to Setup->Terminal. Based on your ...
Fahad's user avatar
  • 554
1 vote

Use terminal command to verify software

Currently, you have the option to compile it using Arduino CLI. You just need to know the Fully Qualified Board Name that you are using and inside your project directory you run: arduino-cli compile --...
Josep Alsina's user avatar

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