13

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, code for functions does not, in itself, use RAM. As an example, this small program for the Micro: int main () { } That uses only 206 bytes of PROGMEM and 0 ...


11

The main difference between the ATmega32u4 and the ATmega328P is that the 32u4 has onboard USB. When ATmega328P are used in an Arduino they are often coupled with an FTDI USB to serial chip. The FTDI chip is about $5 so this may be where the extra cost comes in. Having the USB chip separate is actually not a bad thing: The Atmega328P consumes less power ...


7

1) have i got an out of date bootloader? No. This has nothing to do with the bootloader. 2) if so how do i check? See above. 3) is this intended behavior and if so why? In a manner of speaking, yes - see below. 4) is this a bug in the arduino bootloader or libraries? No. Elsewhere. See below. 5) short of having to change my code to look for ...


6

I cannot find any information about the arduino micro. I also don't know exactly what the proper keywords are that i need to find the relation between timers and pins. Go to the products page for the Micro on the Arduino web site. You will find that the processor is the ATmega32U4. Download the datasheet for the ATmega32U4 - it's on that page. Download the ...


6

Take two 10K or so resistors: +5V | 10K | Pin2-+---> output | 10K | GND The following program does the trick: const uint8_t kPin = 2; const uint32_t kDelay = 10; // 100Hz void setup() { } void loop() { pinMode(kPin, OUTPUT); digitalWrite(kPin, HIGH); delay(kDelay); pinMode(kPin, INPUT); delay(kDelay); ...


6

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 expanded at compile-time to: sensor = ((analogRead(A0) - 512)>0?(analogRead(A0) - 512):-(analogRead(A0) - 512)); Now the "error" is easy to understand. ...


5

If both inputs are 0V, the output will be 0V. If both inputs are 5V, the output will be 5V. If one input is 0V and one 5V the output will be 2.5V. However, if the device attached to the output doesn't have a high input impedance, the voltage will drop some. You could add an opamp to prevent this. I think you can generate the 2 pins outputs using one of ...


5

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 Arduino) to say "I would like you to operate at this speed", not "I would like you to communicate with me at this speed". It is used in situations where the PC ...


5

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 properly communicating with the RTC. If the RTC's red light is on then check your wiring and make sure you haven't reversed SDA and SCL. Also, the DS3231 has and ...


5

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 Arduino Micro and also the Sparkfun Pro Micro, so this answer will look at all four. Arduino Mini Arduino Pro Mini Arduino Micro (Sparkfun) Pro Micro ...


5

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, throw exceptions instead of returning error codes, use lambda-functions, templates etc. As long as you don't use those features, C++ memory consumption is ...


4

Attach your voltmeter across the battery, and measure the available voltage when different things are attached; or attach it in series, and measure current draws. You probably will find that a 9V battery's voltage is under 8 volts when a mix of multiple Arduinos and buzzers is attached. That voltage may be too low to activate the buzzer. A powerstream.com ...


4

There are two major components to an infra-red signal. One is the high frequency carrier wave signal that pulses the LED on and off. This frequency has to match that of the receiver and is used with either a high-pass or band-pass filter to filter out ambient IR light and allow it to only react to a real signal. The second component, and it sounds like ...


4

Both v and vref are integers, which means that integer division will be performed. if v is ever less than vref then the result will be 0. Multiply first, then divide.


4

Based on the documentation : These core libraries allow a 32u4 based boards or Due and Zero board to appear as a native Mouse and/or Keyboard to a connected computer. Core libraries (such as Keyboard.h) are not availabe if your board doesn't mentioned. I don't know which one is right, since your question title mentioned "Arduino Micro" while at ...


3

The USB VID, PID and Serial Number are all programmed into the chip when you upload your sketch. The VID and PID are tied to the board, and the serial number is always the same regardless of which board. So no matter which board you program it will get the same details as any other board of the same kind. There's no option to change the serial number (...


3

If you are not getting anything on the receiver, then the receiver is definitely the problem. These units will boost the gain until it get some signal, any signal. You should be able to power the receiver + and GND (I have one, which ran on 5v, I can't see if these are the same), and put a multimeter from GND to Data, and you should get about half of Vcc, ...


3

The USB part of the Atmega32U4 needs quite a bit of software to operate correctly, which is either not included in the basic blinky example or you got a binary for a different Arduino model. The syslog looks like there is a bootloader present after Reset for a couple of seconds.. [22620.497393] cdc_acm 1-2:1.0: ttyACM0: USB ACM device ^ [22627.966141] ...


3

The micro only has one SPI bus. It is SCK/MISO/MOSI. You may want a second one, but you don't have one. You can't magic one up out of thin air. You could emulate one in pure software (bit-banging) but it won't be anywhere near as efficient as using a real hardware one. Why do you feel you need to have two independent buses anyway? What are you wanting to ...


3

You have multiple copies of the library. Delete the folder located at: C:\Users\Owner\Documents\Arduino\libraries\RF24ArduinoCommunicator-master


3

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 reference:


3

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 are direct from the transformer and is an AC waveform. There is no concept of a DC offset in such a circuit. All the capacitor will do is impose a phase change ...


3

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 OFF it just behaves as a diode. But when the MOSFET is turned ON, the diode is shorted by the conduction channel, thus avoiding its voltage drop (and achieving a ...


3

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 want), but that array contains only the character to sent. What you want is to send only 1 character, so use 1 instead of strlen. Also, you can get rid of the ...


3

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 has been stated. you can provide an implementation though. There is much of C++ left to make use of. here are some examples Templates They are very useful ...


3

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 buffered nature of the Serial driver it's not as easy as just printing. However, it's simple to achieve: just flush the serial before sleeping. This ensures that ...


3

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. Keyboards don't know what is printed on the keycaps. All they understand is where the buttons are physically located. The same with the Arduino. It's sending ...


3

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 section E.4 (page 67) E.4 HID Descriptor (Keyboard) Part Offset/Size Description Sample (...


3

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 of the MCP4725's datasheet: It describes the operation is Fast Mode, which seems to be the correct mode for this. (Similar descriptions for the other modes can ...


2

The ones that have a USB connector are plug-and-play with a USB host. The ones that don't need a USB-to-UART bridge.


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