Most Popular

1500 questions
5
votes
4 answers

Timer2 does not work as it should

I am currently playing with Arduino timers (on UNO currently) and I am building a library that has a function that must be called every millisecond. There is plenty of code samples on Internet so I went with something that seemed perfect for my…
jfpoilpret
  • 9,132
  • 7
  • 37
  • 54
5
votes
2 answers

Is it wise to use analog input pins to read digital buttons?

I am thinking about building a circuit that is literally going to take 11 of the 14 digital pins of an UNO to communicate with an SD card and an external EEPROM chip (EEPROM programmer). Using 4 shift registers and the SD card, I will have 1 digital…
cbmeeks
  • 247
  • 2
  • 9
5
votes
3 answers

Arduino Core for the Raspberry Pi Pico

I recently bought a Raspberry Pi Pico to play with, and am attempting to upload my first program to it the Arduino way, as my own operating system rather than a c++ program over an existing operating system (meaning to replace the built-in Raspberry…
nerdguy
  • 63
  • 6
5
votes
6 answers

Lowest power possible in Arduino

I have googled all around and I know about some tricks to make ATmega328 not being a power hog. I am using Arduino Nano V3.0. However, I didn't find out what is the minimal consumption possible with it? My project consists of an Arduino that will…
nemewsys
  • 215
  • 1
  • 5
  • 12
5
votes
3 answers

Using Arduino as a standalone compiler

I mostly program in C/C++ so I conviniently have a GCC compiler for all my compilations. I was wondering if there is a special compiler for Arduino that can be used just like the GCC Compiler? Because just taking a .ino sketch and passing it to the…
5
votes
5 answers

Should I try to make my sketches as small as possible, even when I have enough room?

There has been a lot of talk about shrinking sketches recently, but if you don't need the room, should it be done? Will it speed up my program? Take this code: int led = 13; int val; void setup() { pinMode(led, OUTPUT); …
Anonymous Penguin
  • 6,285
  • 10
  • 32
  • 62
5
votes
2 answers

What's taking up so much RAM in an almost empty sketch?

I wanted to check how much memory (RAM) is used by an "empty" sketch. Here is my code: int freeRam() { extern int __heap_start, *__brkval; int v; return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval); } void setup() { …
rubix_addict
  • 225
  • 4
  • 6
5
votes
0 answers

SPI between Master arduino and Slave arduino

How can I send the string from Slave SPI to Master SPI? I want to write code in Bare Metal. The problem which I am facing is I can't make out what will be my blocking function in Master SPI code when receiving data from slave SPI. As my SPIF bit is…
Kunal
  • 81
  • 1
5
votes
2 answers

Why are LED 0 and 1 on as well?

I was just playing around a bit and ran into a strange problem. LED 3, 5, 6, 9 and 10 are on, as intended. For some reason LED 0 and 1 are on as well. Can someone explain why this is happening? int ledPins[] = {3, 5, 6, 9, 10}; int pinCount =…
5
votes
1 answer

How to connect 5V sensors to 3.3V digital input (Due)?

I'm completely new with Arduino and microcontrollers in general. I have several 5V sensors, and need 3.3V because that's the max for the Due. Is it possible to use a resistor to connect it to the Arduino? Do I have to measure the current from the…
Friend of Kim
  • 1,533
  • 3
  • 16
  • 16
5
votes
3 answers

Can I use an ATmega328 alone without anything and what is the max voltage I can power the atmega328 with

Okay 2 questions. If I am to replace the Arduino with an ATmega328 programmed with a standard blink on pin 13, is this configuration correct, do I still need oscillators and whatnot? Second question is, what is the max voltage I can power the…
suckms
  • 125
  • 1
  • 1
  • 7
5
votes
3 answers

Corrupted output from HC-05 Bluetooth module

I have arduino Pro Mini 3.3V version with hc-05 module connected to 3.3V/GND and RXI/TX0 pins. I am then using my android phone to connect to the module. It shows up and pairs fine. Then I use BlueTerm app to view the output. I am seeing output that…
DominicM
  • 597
  • 3
  • 7
  • 13
5
votes
1 answer

ST7789 TFT display only shows a correct image while Arduino reset button is held down - Why?

I am trying to get the ST7789 TFT display to work with Arduino. I followed online guides for connections and am using the fast library fron github and included workbench ino (https://github.com/cbm80amiga/Arduino_ST7789_Fast). Problem: The program…
WildCat
  • 303
  • 2
  • 10
5
votes
2 answers

Multiple Push buttons to one input

So I am trying to use one input to control an LCD display. The goal being that once one of the buttons is pressed it delivers a message. I have watched quite a few tutorials and can get the program to work sometimes. Yet, it is still pretty buggy…
5
votes
0 answers

Modbus TCP/IP using Arduino uno and ENC28J60 module

I have this project where I need a modbus tcp server that will host a series of sensor data for other modbus client devices to read. I use this Library by Andresoarmento This is the code i am using from the library example: #include…
Deadpool
  • 51
  • 2