12
votes
Accepted
delay(time); vs if(millis()-previous>time); and drift
There's one important thing that you need to remember when working with time on an Arudino of any form:
Every operation takes time.
Your foo() function will take an amount of time. What that time is,...
11
votes
Newbie Using Brown Out detector on Arduino Due for saving variables to eeprom?
Not a good idea - if the power goes down when you writing to EEPROM, your EEPROM data will be corrupted. The brown-out detector goal is to shut off the MCU, before it goes mad due to low power voltage....
9
votes
Sizeof variables and Due's RAM
sizeof doesn't return the number of elements. It returns the number of bytes. Since they are uint16_t arrays each element is 2 bytes - hence twice the size.
The reason your last number is only 40928 ...
8
votes
Accepted
Why does the Arduino Due have a native and USB programming port?
Either port can be used for programming, but the native USB port lets you do other things:
It also enables the Due to emulate a USB mouse or keyboard to an attached computer. To
use these ...
7
votes
Breadboard-to-Arduino wiring with flat flex cable assemblies?
Search for male-male jumper wire. Some of what you'll find is individual wires but there are also many that are connected together and you can rip off the width you need.
Here's one from Adafruit but ...
7
votes
Accepted
SAM3X8E (Arduino Due) Pin IO registers
If you have a read of section 31 of the Datasheet, available from here, things may come a little clearer for you.
Here's a summary of what I know:
PIO stands for Parallel Input/Output and offers the ...
7
votes
Accepted
Read OUTPUT pin value in Arduino Due
That method only works on AVR based systems. It exploits a "feature" whereby the IO pin, when in OUTPUT mode, is also in INPUT mode at the same time, and reading the pin reads the value that the pin ...
7
votes
Accepted
Faster Arduino Mega
You should begin working with 3.3V. 5V is getting rarer and rarer as far as "real world" applications go.
Many devices that you have been using at 5V will also work at 3.3V (such as the MAX22500E). ...
6
votes
Accepted
Memory allocation on Arduino Due never returns NULL
Why
This is a partial answer, for now, mostly with regard to:
Why does malloc() never return NULL?
So, the Due appears to use Newlib as its libc implementation; that is the systems C (standard and ...
5
votes
Accepted
Why does command line BOSSA not recognize Arduino Due?
from the IDE's menu you can activate the verbose upload (and compile) mode, that will print all the command executed; Probabibly what you miss is the necessity to open the serial at 1200baud, that ...
5
votes
Arduino Time Clock Accuracy
Re-visiting an old question... as I found a very informative blog post
that sheds new light into it. But let me first provide some context
before giving the link.
When assessing the quality of a time ...
5
votes
Breadboard-to-Arduino wiring with flat flex cable assemblies?
Again similar to Sachleen's answer. You can crimp your own connectors onto a ribbon cable, that way you can have the desired header size.
I've just done this manually with some pliers (I couldn't ...
5
votes
Accepted
MCU Type ATmega16U2 not avaliable in Eclipse AVR Plugin
The ATmega16U2 on those boards isn't intended to be programmable by the end-user. It's only there to help convert from USB to TTL serial, which lets your computer communicate with the board's main ...
5
votes
High Frequency Sine Wave Generation
To generate a square wave, you only need to update the output at a rate of two points per cycle. (Technically, when the Arduino's PWM output is configured for 50% duty cycle, that's a square wave at ...
5
votes
Accepted
Simple LED circuit is not working
What connects the resistor to the LED?
Absolutely nothing.
It's hard to work out which holes the LED is plugged into, but I think your current circuit looks something like this:
You need to connect ...
5
votes
Arduino is not responding to a Tiny RTC I2C modules, How to fix?
You have a couple of problems (although the lack of pull-up resistors is not one of them, because the board you linked has pull-up resistors on it).
The DS1307 needs to operate at a minimum of 4.5 ...
5
votes
Accepted
How do I read from /dev/ttyACM0 in Linux without a terminal emulator?
I have had very similar problems with my yun(shields) and I found the stty command to be very crucial for a good working.
I use following command and it works with mega and due on the yun
stty -F ${...
5
votes
Accepted
Arduino Due vs Mega 2560
The 'R3' version boards and shields are compatible with 3.3V and 5V. For example the Ethernet Shield V1 version 'R3' can be used with the Due. The new Arduino Ethernet Shield 2 is also compatible with ...
5
votes
Only getting error from ESP8266 AT commands
The AT firmware responded with ERROR because it received data, but timed out waiting for the CR/LF line ending.
AT commands must be terminated with Carriage Return '\r' and Line Feed '\n' control ...
5
votes
Accepted
How to enable exception handling on the Arduino Due?
First, we must make sure the "-fno-exceptions" compiler flag is overwritten with "-fexceptions". In addition, we must link a separate library that includes the compiler support ...
4
votes
Accepted
Connecting battery and LED to Arduino Due
What you want is something like this (ignore the fact that my mini breadboard is stuck to a shield):
My starter Arduino kit came with the connector for the 9 volt battery into the power socket on the ...
4
votes
Can't drive long NeoPixel strips with Due or Duemilanove?
Your Duemilanove only has 1k of RAM. That's not much. Each pixel takes 3 bytes of RAM (R/G/B). So (say) 60 pixels would be 180 bytes. That's less than 1k, but there would be other uses of RAM in your ...
4
votes
Accepted
Can I Implement a PLL on an Arduino?
A PLL is a very complex device which is not something that can easily be created purely in code.
Many microcontrollers include a PLL as part of their oscillator systemm which allows them to run ...
4
votes
Arduino due slow clock
The slow clockr is primarily used for the real time clock (RTC) module inside the SAM3X chip. It can also be routed to other places when you want a low speed clock source, but the only places it is ...
4
votes
Accepted
Arduino Due: Interrupt-based ADC hangs processing
In your interrupt handler, ADC_Handler(), you set sample_buffer_full when the buffer is full. I don't see anywhere in the code where sample_buffer_full ever gets reset (cleared) once it's been set.
...
4
votes
Accepted
Simultaneously reading data from multiple serial ports
My question here is how can I simultaneously read out all the data from the different serial ports on the arduino mega sketch.
As you are using several serial ports data can already be received ...
4
votes
Arduino onboard LED pin number as a constant
Try LED_BUILTIN:
pins_arduino.h:static const uint8_t LED_BUILTIN = 13;
4
votes
Accepted
4
votes
Accepted
Programming Arduino in Pascal?
Not Pascal, but Ada, which is much less restrictive than Pascal while enjoying the same advantages over low-level programming, and much more actively supported with language revisions as recently as ...
4
votes
Arduino Due vs Mega 2560
The Due can do a lot of things much faster. It has more memory and far more processing power. It has more flexible and more powerful built-in peripherals.
It can't easily interface with 5V devices ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
arduino-due × 457serial × 54
arduino-uno × 34
spi × 26
programming × 22
arduino-mega × 21
interrupt × 19
sensors × 17
power × 16
usb × 16
arduino-ide × 15
i2c × 15
c++ × 13
shields × 13
adc × 11
arduino-nano × 10
timers × 10
sd-card × 10
flash × 10
pins × 9
pwm × 9
communication × 9
analogread × 9
uart × 8
sam3x × 8