We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

2

You should not manually control the SD card's CS pin. By doing so you are confusing both the library and the SD card. There is a special operation with SD cards in "SPI" mode that isn't part of the SPI standard as part of the initialization routine whereby the master (the Arduino) must send at least 72 clock pulses to the card with the CS pin held HIGH. ...


1

I added pull-up resistors to the board and it started working. Turns out that the boards weren't well designed and the I2C lines were pulled up to 1.8V instead of Vin. By removing the pull-ups and adding pull-ups to Vin, the circuit started functioning. The circuit worked with Mega because it has in-built Pull-up Resistors.


-1

Yes, you can. They use ATmega328 / Atmega328P microcontrollers, which are basically the same. (The differencies of those microcontrollers are about Brown Out Detection - how they could be set to react on too low voltage. No problem in nearly any Arduino operation.) The boards differ mainly in the board size and places for pins.


0

You have to note that if you go in "power down" mode, you will not be able to get the time as millis() will return the wrong time. If you just want 15 minutes, you can just put it inside a for loop: for(int j=0;j<112;j++) LowPower.powerDown(SLEEP_8S,ADC_OFF,BOD_OFF); So the next instruction will be executed approximately after 15 minutes (15 * 60 / 8 = ...


0

In your function lowPower(), instead of repeating the LowPower.powerDown(), loop over that call enough time to make up the total sleep-time you need. That's the general case. For your specific case, where you need 15-minute intervals and 2-hour intervals, lowPower() should loop 113 times (15:04, since 15 *60 doesn't divide evenly by 8). In your loop() ...


0

Here's a sketch that uses the LowPower library. You'll have to "tweak" the batteryCounter and sensorCounter variables to get the times a little closer to your specifications. #include "LowPower.h" unsigned int sleepCounter = 0; unsigned int sleepCounter2 = 0; unsigned int batteryCounter = 110; // 8 sec X 110 = 15 min approx. unsigned int sensorCounter = 900;...


0

Try to use an external timer. I have the same problem approximatly.


1

The Serial output on an Arduino is quite slow. By printing your output, you will slow down the readings so much that it will appear to be nonsense. You should collect a series of readings into a C array of floats in RAM, stop recording, and then log that array of values. Note that you don't have a lot of RAM to work with on most Arduinos, so you will only ...


0

I've been rebuilding using Atmel Studio. After a long time bringing my C++ skills up to scratch I've managed to get it to work very reliably. I like the greater level of control it brings. I suspect that I was trying to do something in Arduino IDE that cannot be done with the Wire library. I had to effectively rewrite the Atmel Start Slave driver to get it ...


1

Your first decision is to figure out the heat load on the space. How many BTU/hr you need to remove to keep the temperature you want. Then figure out how large / how many Peltier you need to remove that much heat. Do you need some reserve capacity for unusual circumstances or is a higher inside temperature Ok sometimes? Then you need a power budget - how ...


0

A microcontroller like an Arduino needs a constant source of regulated 5V (or 3.3V for some models.) The voltage of a solar panel varies depending on the amount of light, and in low light conditions there won't be enough power to run the Arduino. So the short answer is no, you won't be able to run the Arduino reliably from a solar panel without a battery. ...


1

The limitation is purely in software. The I2C hardware has a limit of one byte at a time, and the software creates a 32 byte buffer and feeds each byte from that in turn. While it would be perfectly possible to increase that buffer size, you may find you have other problems when you get above 255 bytes, since lots of parameters and internal variables for ...


2

The problem is repeat: if(digitalRead(ProxSensor==LOW)) goto repeat; ProxSensor==LOW is false so 0. you read the pin 0 and the outcome is random. The surrounding wiring can affect that. If digitalRead(0) is zero the wav starts playing immediately again. At least use while (digitalRead(ProxSensor) == LOW);


0

The TMRpcm and one of your other libraries might use the same timer on Uno which causes one of them to break. Either get a Arduino Mega which can run TMRpcm on TIMER3,4 or 5 or use libraries that don't require a timer.


1

This is just a partial, rushed answer. You should be able to get a significant speed-up if you define your own ISR for handling the interrupt, as in: ISR(INT1_vect) { ... } The Arduino way of using interrupts is instead void trigger() { ...} void setup() { attachInterrupt(int_number, trigger, CHANGE); ... } but this is slow, as it involves the ...


0

You may try to bit-bang the protocol using direct port access. This is less convenient, but way faster than digitalWrite(). Below is an example, untested program. I am assuming the pinout is data = PB0 = digital 8 clock = PB1 = digital 9 pins PB2 – PB5 (10 – 13) are unused Edit: This updated program uses the clock as an input, and the data as an output. ...


1

As usual with programming, there are many solutions, for example: You can use a bitmask, put 4 variables in an array with binary values 1000, 0100, 0010 and 0001 and when the switch is pressed, you store the value into each LED pin by comparing the value. However, a more simpler solution is just use a counter from 0 to 4, if the value is 1, the first LED ...


Top 50 recent answers are included