Most Popular

1500 questions
5
votes
2 answers

Powering Atmega328p from 4.5V

I want to use Atmega328p controller to handle some very simple signals. I'm using the chip and not the whole arduino board because it is a lot cheaper. The problem is that chip itself doesn't have voltage regulator so I need to think of a…
Mirakul
  • 75
  • 4
5
votes
2 answers

Does the compiler generate intermediate assembler?

My source files are *.ino, but after compilation there aren't any other files placed in the folder. Does the compiler generate intermediate assembler, and if so, where does it leave them? Or is the machine code available somewhere?
Joris Groosman
  • 1,171
  • 3
  • 11
  • 25
5
votes
3 answers

How do I make another action repeat inside a loop?

So, I've just started programming Arduino (and also in general), so I'm doing basic things, like switching on and off LED's. I've made them light in a sequence and then turning them off (in the same sequence), and now I wanted to use 2 buttons, one…
AndreFro
  • 53
  • 6
5
votes
2 answers

Sending large structs via nrf24l01 leads to cliping of some structs members

I started with building of the wireless temp/hygro/other values probes. I use 2 arduinos, both with nf24l01+ wireless transceivers, library used is rf24.h (https://github.com/maniacbug/RF24). Basically ping/pong test works for me - so each arduino…
user241281
  • 51
  • 1
  • 3
5
votes
1 answer

Serial monitor can't display float and double values with absolute greater than 4294967040=2^32-2^8

I have the following sketch: void setup() {} void loop() { float af = 4294967040.0; float bf = 4294967240.0; double ad = 4294967040.0; double bd = 4294967040.00001; Serial.println(af); Serial.println(bf); Serial.println(ad); …
LukasFun
  • 295
  • 1
  • 4
  • 16
5
votes
2 answers

How to read from and write to rs232 device from/to Arduino

I would like to read data from a rs232 device (SL-5868P Sound Level Meter). protocol and more : https://sigrok.org/wiki/Colead_SL-5868P. I already have a Python script to read the data with a TTL to USB converter (without Arduino). Now I also want…
Joost
  • 75
  • 1
  • 1
  • 6
5
votes
1 answer

Wirelessly (but fast) transfer STEP and DIR output from Arduino to stepper driver

Very short version: Looking for a way to wirelessly get STEP and DIR signals (only those two signals) from an Arduino to a DRV8825 stepper driver about a meter away: Arduino -> STEP and DIR IO pins -> transmitter ) ) ( ( receiver -> DRV8825 edit…
Jasper
  • 151
  • 3
5
votes
2 answers

Set Arduino digitalRead reference voltage

I wanted to know if the reference voltage for the digitalRead() function could be set to a particular voltage, either with an external reference or internally. In the Arduino reference under the constants heading they have mentioned that they use…
Suman Roy
  • 153
  • 1
  • 5
5
votes
2 answers

verification error, first mismatch at byte 0x3895 0xdf != 0x44?

I bought a SainSmart Arduino Mega 2560. I uploaded a small sketch to it, and it uploaded fine. When I upload a larger sketch though, I get this error: verification error, first mismatch at byte 0x3895 0xdf != 0x44 So obviously there's…
user3042719
  • 151
  • 1
  • 3
5
votes
1 answer

Cannot find Arduino under /dev Directory

I have the Arduino board connected to a USB port of my machine. But I cannot find it under /dev/ directory in my Ubuntu. Does anyone know how to deal with this issue? By the way, "lsusb"'s output proves that it has been recognized. Here is the…
user3684042
  • 153
  • 4
5
votes
3 answers

what is the use of "<<=" operator?

I recently read this piece of code and I dont know what is the use of "<<=" in the for loop: for (mask = 0x01; mask>0; mask <<= 1) { if (data & mask){ // choose bit This is the entire code: //Created August 23 2006 //Heather…
explorer
  • 379
  • 2
  • 5
  • 17
5
votes
2 answers

LCD scrolling down problem

I have a list of set-ups and I only have 2 rows in the lcd , I'm trying to scroll down for the moment and I'm doing this by changing the row in the setcursor function to either 0 or 1. However since that I'll be having about 10 set-ups I used an…
user730
  • 51
  • 1
  • 3
5
votes
2 answers

When it comes to UART to RS485 communication, what is the difference between the 'MAX485' and the 'HW-0519' module?

I recently found this model with the ID 'HW-0519' on it. It can be found online (HW-0519 in Aliexpress) and is sold for the purpose of converting UART to RS485 communication using Arduino devices. The MAX485 module (MAX485 in Banggood) is the more…
C Vith
  • 103
  • 1
  • 7
5
votes
3 answers

arduino resets or hangs after providing power to DHT22

I'm developing a low power project based on Atmega328p which among other things uses a DHT22 to measure air humidity. DHT22 spec says that it consumes 50uA when idle. This is too high for me (I'm aiming at sub 10uA consumption for the whole device…
rubix_addict
  • 225
  • 4
  • 6
5
votes
1 answer

Chain of, or one big if sentence

(This might be more of a common C question) I want to test several conditions in an IF-sentence if(variable) { // fastest check if(register) { // a bit slower if(read_peripheral) { // very slow check // [do…