14
votes
How can Arduino's 8 bit Microcontrollers handle C++
It's a misconception that using constructors or C++ in general requires lots of RAM. Plus, to be clear, the AVR processors like the Micro and Uno have separate RAM and PROGMEM (program memory). So, ...
10
votes
Arduino Micro vs. Pro Micro
I actually think you are meaning what is the difference between the Arduino Mini and the Arduino Pro Mini, since there is no such board as the Arduino Pro Micro. However there is a board called the ...
6
votes
Accepted
Unexpected negative values from abs() function inline with analogRead
abs() is defined in Arduino.h as a macro:
#define abs(x) ((x)>0?(x):-(x))
A macro does not evaluate in the same way as a function.
sensor = abs(analogRead(A0) - 512);
This statement will be ...
6
votes
Accepted
Arduino Micro 5V Vin and 3v3 pins
Vin is a power INPUT. It is connected to the input of the voltage regulator, which enables you to power the Arduino with voltages between 6V and 12V, while the Arduino itself is running on 5V.
The 5V ...
5
votes
How to have some code executed at a certain time of day with a DS3231 RTC?
If you are getting 165:165:165 that indicates usually a problem with your I2C bus. But it might also be a power problem in the RTC.
In any case, check your wiring.
Your processor is simply not ...
5
votes
Accepted
What's the problem with baudrate?
On a direct USB CDC/ACM connection (as you get on the Micro) there is no such thing as baud rate.
Any baud rate setting performed by the host (the PC) is merely an instruction to the device (the ...
5
votes
How can Arduino's 8 bit Microcontrollers handle C++
The talk about C++ being incompatible with small MCUs implies that developers would use features it provides. In a good C++ project you're expected to use vectors and iterators instead of C arrays, ...
5
votes
How can Arduino's 8 bit Microcontrollers handle C++
C++ is fine with Arduinos or other AVR based Systems.
I've been use it for quite a while in a home automation project.
The avr runtime does not support exceptions nor dynamic memory allocation, as ...
5
votes
Accepted
What does a tilde (~) mean as annotation for a data pin?
It means the pin can be a PWM output for use with analogWrite().
4
votes
Accepted
Use lowpower-libary and still use serial connection and other things
Yes, activating low power does disable the UART - but only while it's sleeping.
To use serial you just need to ensure that you only use it while it's not sleeping - and due to the interrupt and ...
4
votes
Accepted
Square wave generator generates a shorter pulse from time to time
There are two issues here:
There is a data race on counter[]: it can be modified in interrupt
context while it is being read (or even modified) by the main
program.
Clearing counter[y] will make you ...
3
votes
Accepted
How to have some code executed at a certain time of day with a DS3231 RTC?
SDA and SDL pins on an Arduino Micro are on pins D2 and D3 as mentioned on the official page:
TWI: 2 (SDA) and 3 (SCL). Support TWI communication using the Wire library.
and shown on this pinout ...
3
votes
Accepted
Having problems compiling this code for NRF24l01 on arduino uno and arduino micro
You have multiple copies of the library.
Delete the folder located at:
C:\Users\Owner\Documents\Arduino\libraries\RF24ArduinoCommunicator-master
3
votes
Accepted
Arduino-based mains frequency monitor follow-up
You should remove the capacitor. It won't remove any DC offset because there can be no DC offset. From where would the DC offset be relative? There is only two points in the circuit, and both of them ...
3
votes
Is there any way to use the serial port as an interruption source?
Use millis() for the timing of the temperature reading, then you can read from the serial in between time and won't need to use any interrupts.
unsigned long last_measure = 0;
const byte buffer_size ...
3
votes
Accepted
Stopping Serial on RX/TX pins while running Serial on USB
The Serial and Serial1 are two seperated ports. They are not connected. The Serial is the USB serial and does not use pin 0 and 1 at all. The Serial1 is the hardware serial port at pin 0 and 1, but if ...
3
votes
Accepted
Why is the T2 transistor used in Arduino Micro?
T1 and T2 implement a power supply ORing of the VUSB and VIN voltages. Read this for extended information.
The body diode of each MOSFET performs the basic ORing function. When the MOSFET is turned ...
3
votes
Accepted
Arduino keypad and RF 433MHz transmitter problem
The problem is you send a character of type char, thus exactly one byte.
However, when you send it you have to give the length and you use strlen. However, msg is an array (at least that is what you ...
3
votes
Accepted
What is the smallest duration that can be measured using micros()?
What is the least value of time that I could measure(count) using micro() in Arduino board?
The answer is 64 clock cycles or 4 us @ 16 MHz. Please see the Arduino AVR core[1] for more details.
...
3
votes
Emit region-neutral keyboard signals
No. There is no such facility.
If you take a German keyboard and plug it into a US configured computer the key layout will be wrong. You have to tell the computer that you're using a German keyboard.
...
3
votes
Emit region-neutral keyboard signals
Download Device Class Definition for Human Interface Devices (HID)
https://www.usb.org/sites/default/files/documents/hid1_11.pdf
See section 6.2.1 HID Descriptor
bCountryCode 0x09 German
also see ...
3
votes
Accepted
Software I2C - sending data
The main problem seems to be, that you are not adhering to the MCP's communication protocol. You just try to directly and only send the pure analog measurement to it.
Look at this image from page 18 ...
3
votes
Accepted
STM32 as keyboard
The STM32F105xx series is not yet supported by either Arduino core (STM32 core or maple core) and neither mbed-os.
The chip is still usable with the STM32 provided framework, the STM32HAL, (e.g. ...
3
votes
Accepted
Why wont my custom Arduino-Micro-based board connect over USB?
Well I finally found the source of the problem, many thanks to everyone here who helped me narrow things down and kept pointing me in the right direction. After figuring out that D+ and D- were ...
2
votes
Questions about the Arduino Micro PCB
• “... powering off of USB, I won't [need] the 5 and 3.3 V regulators or the 5 V Selector ...”
True, except that some of those parts maintain circuit continuity. For example, when USB power is ...
2
votes
Accepted
How to connect an Arduino Micro to MPU-6050
That IMU and library require an interrupt to work correctly. It is programmed to use interrupt 0 with this line in the setup function: attachInterrupt(0, dmpDataReady, RISING); This is not the proper ...
2
votes
Problems building an Arduino Micro with through-hole components
I select "ArduinoISP" as the programmer. I press "Burn Bootloader". I get the following: avrdude: Error: Could not find USBtiny device (0x2341/0x49) Error while burning bootaloader.
You need to ...
2
votes
Accepted
Use digital pins as analog - Arduino Micro
Constants are variables that cannot change. They are constant.
In this case they are variables that have been set up in the board definition files (in pins_arduino.h in case you're interested) and ...
2
votes
Mini Voice Recorder for Arduino
FYI, these ISD chips sample audio and store a variable charge on a single flash like cell. They do not convert a sample to a numerical value. There is no data to be read from the chips nor (AFAIK) is ...
2
votes
how to communicate MPU-6050 ( on arduino micro) wirelessly using nrf24l01 to arduino uno?
You have a few options here for the wireless communication (~ denotes wireless):
MPU -> Arduino -> Bluetooth ~ ~ ~> PC
MPU -> Arduino -> NRF ~ ~ ~> NRF -> Arduino -> PC
MPU -> Arduino -> WiFi (ESP?) ~...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
arduino-micro × 191usb × 23
arduino-uno × 18
atmega32u4 × 15
serial × 14
arduino-ide × 10
power × 10
arduino-leonardo × 10
bluetooth × 9
arduino-pro-micro × 8
sensors × 7
timers × 7
analogread × 7
mpu6050 × 7
keyboard × 7
arduino-nano × 6
pins × 6
softwareserial × 6
c++ × 5
i2c × 5
library × 5
communication × 5
bootloader × 5
programming × 4
interrupt × 4