Most Popular

1500 questions
6
votes
2 answers

User callback functions

I want to write a class that allows the user to attach his own function to a member function that listens for messages coming from a wireless module, so that the user's function can be called depending on the message. I am thinking about using…
Vasil Kalchev
  • 293
  • 1
  • 2
  • 12
6
votes
2 answers

How can I power an Arduino Nano with a LiPo battery, preferably 3.7v

I am a newbie to Arduino, so please bear with me. I am trying to figure out how to power an Arduino Nano with a LiPo battery. I want to use a 3.7v if possible, as my project needs to be lightweight. There are two possibilities I know could…
saddlepiggy
  • 61
  • 1
  • 1
  • 3
6
votes
3 answers

How can I reduce the size of my sketch?

Looks like I'm overshooting the storage of my Adafruit Trinket: Sketch uses 5,600 bytes (105%) of program storage space. Maximum is 5,310 bytes. Global variables use 109 bytes of dynamic memory. Any tips for reducing the footprint of my…
Shpigford
  • 484
  • 2
  • 8
  • 24
6
votes
1 answer

Why does pulse sensor shows gaps when I move it?

I modified the serial code in this way and I don't think the gap is produced by my edit even because it made it even before: ////////// ///////// All Serial Handling Code, ///////// It's Changeable with the 'serialVisual' variable ///////// Set…
Gabriele Giordano
  • 161
  • 1
  • 1
  • 9
6
votes
2 answers

Arduino command line vs. Arduino builder

I'm working on adding my Arduino to continuous integration and I came across two different possible ways of doing this, Arduino command line, and arduino-builder. Can someone explain why the arduino-builder tool exists separately from calling…
Bob
  • 175
  • 7
6
votes
2 answers

Why need a delay between readings?

When I learn the tutorial in Analog Read Serial Digital Read Serial both of the code examples have a line of code of delay(1) and I cannot understand the comments clearly: delay(1); // delay in between reads for stability The stability…
Victor He
  • 133
  • 2
  • 6
6
votes
2 answers

Why is my SRAM so quickly filled? There are not more than 60 bytes

I have just gone through all my code. At max I use 60 bytes. I have done everything in order to minimize its usage - I even store booleans as bits, not bytes! What could be happening here? The only thing that comes to my mind are extremely large…
SlowerPhoton
  • 195
  • 7
6
votes
1 answer

RePaper 2.7" eInk Display with Arduino Due

I got a RePaper 2.7' eInk display that unfortunately doesn't support Arduino Mega because of its limited SRAM capacity (8k bytes). I am porting the library to Arduino Due because of its sufficient RAM capacity (96 KB in two banks: 64KB and 32KB). I…
6
votes
1 answer

Understanding global variables on Arduino

I am rewriting a set of LED manipulation functions to be more object oriented, and I have found that, mysteriously, my global variable memory space has been over consumed, despite a reduction of the use of global variables. I played around with a…
watusimoto
  • 61
  • 2
6
votes
3 answers

Why does an RGB LED between VCC and PWM work?

I'm an Arduino beginner and I recently bought a cheap starter kit on eBay. One of the lessons in the starter kit is an RGB LED controlled by 3 PWM output pins. However, the arrangement of the connections seems a bit funny to me: To my surprise, it…
NobRuked
  • 163
  • 4
6
votes
5 answers

How to dim background LEDs on TFT display with ILI9341

I have bought a 2.5" TFT shield online, which is equipped with the ILI9341 controller. I need to dim the intensity of the background LEDs to match ambient light. This particular shield does not provide a pin to control the intensity of the LEDs with…
kxtronic
  • 396
  • 2
  • 4
  • 10
6
votes
1 answer

How to install Arduino IDE on Raspberry Pi

How do you install the Arduino IDE on the Raspberry Pi running an ARM version of Ubuntu or Raspbian? There doesn't seem to be any official ARM release. Both distros have an "arduino" package in their standard repos, but it only includes an ancient…
Cerin
  • 1,688
  • 2
  • 28
  • 44
6
votes
1 answer

Compute yaw from magnetometer and accelerometer

I use an Arduino and a 9 DOF sensor (gyroscope, accelerometer and magnetometer) and I'm trying to use the pitch, roll and yaw that the sensor gives me to rotate an object in unity. I managed to correctly compute pitch and roll (the z and x axis in…
BAmadeusJ
  • 163
  • 1
  • 6
6
votes
5 answers

433mhz range optimization

I would like to get the best range possible from my 433MHz modules. After A LOT of searching and reading, I'm convinced I should be able to cover 10m indoors with free line of sight. [update] After some tips in the comments I changed a few things.…
Thijs
  • 432
  • 1
  • 6
  • 21
6
votes
1 answer

A good water flow meter to monitor home usage with Arduino

I'm searching for a good water flow meter to add to my home controller project with Arduino. I have been searching in several pages and I only found some devices that work for low flow. I need to control the water usage in my home and I thought to…
Juan Antonio
  • 181
  • 5