Most Popular

1500 questions
5
votes
3 answers

Set EEPROM from PC before program

I have been working on an arduino program, which has gotten rather large. I am close to hitting the 32k limit on Flash for my ATmega328p. I would like lower my program size by saving some of my many string literals into EEPROM. All of the example…
riverrun
  • 85
  • 1
  • 4
5
votes
0 answers

Arduino WebSocket Client "Connection Failed"

I use this code to connect Arduino MKR1000 to API through Web Socket, but it didn't connect to the server. Can any one help me to correct the code. This is the Arduino code: #include "Arduino.h" #include #include #include…
MBS
  • 181
  • 1
  • 8
5
votes
2 answers

Bit shifting fails with warning: left shift count >= width of type

Given the following minimal working example. I tested this initially with uint16_t and it worked with no warnings. After that, I adjusted everything to work with uint32_t. #include /* needed for the uint16_t type*/ #include
JustCoding
  • 165
  • 1
  • 6
5
votes
1 answer

Why do I get negative voltages for a PWM waveform?

I used my Arduino Uno's pin 3 to generate a PWM output. The code is: void setup() { // Put your setup code here, to run once: } void loop() { analogWrite(3, 180); } I connected the output directly with a oscilloscope. And the output waveform…
Legend Lee
  • 53
  • 4
5
votes
1 answer

ATMEGA328 SPI MCP2515 - SPI communication freezes at certain point

I got 2 boards with an ATMEGA328 microcontroller and MCP2515 CAN Controller and I'm trying to get them communicate with each other. To shortcut the programming a little bit I'm using the Sparkfun CAN BUS Library, but I am not using ther…
KarlKarlsom
  • 176
  • 2
  • 12
5
votes
1 answer

bitClear doesn't work on most significant bit

I'm currently working on a project where I read a 32 bit sequence. The digitalPin is always HIGH when no sequence is received and starts oscilating with about 1kHz when the sequence starts (RC5). I am setting and clearing bits of an uint32_t…
elhe
  • 85
  • 1
  • 6
5
votes
1 answer

Why do I get "invalid operands of types 'const char*'" error?

I am making an Arduino alarm. This is the error: exit status 1 invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' Here is the code that triggers it: lcd.print("0"+hours+":"+minutes); This code is similar, but…
starrynight234
  • 63
  • 1
  • 2
  • 4
5
votes
2 answers

Why was the Due retired?

Looking at the Sparkfun comparison, it seems that the Due is by far the fastest of the Arduinos and has I/O capabilities similar to the Mega. So why was it retired with no obvious successor?
dpdt
  • 151
  • 1
  • 2
5
votes
1 answer

Why Arduino Severino (S3V3) sometimes needs reseting when uploading a sketch?

I have an original Arduino UNO R3 that I bought and an Arduino Severino (S3V3) that I've built. I have no problems uploading sketches to the UNO, but sometimes, when uploading to the Severino board, I have to hard reset it at a specific time during…
Ricardo
  • 3,370
  • 2
  • 24
  • 53
5
votes
2 answers

Arduino's digitalWrite, precautions for direct port manipulation?

I stumbled upon this piece in digitalWrite. I'm unsure why clearing interrupts and setting/resetting SREG is neccesary here. Can anyone shed a light on this? uint8_t oldSREG = SREG; cli(); if (val == LOW) { *out &= ~bit; } else { *out |=…
aaa
  • 2,695
  • 2
  • 24
  • 40
5
votes
2 answers

How to determine Flash size?

I need to determine the flash size of my ESP8266 on my NodeMCU module in order to flash the AT firmware onto the board. Apparently different boards come with differently-sized flash memories. Can anyone tell me the easiest way to find the flash…
Sumanth
  • 177
  • 1
  • 2
  • 6
5
votes
2 answers

DC Motor Speed Measurement using Rotary Encoder

I have written the following code to measure the speed of a unidirectional DC Motor.I have attempted to measure the time between successive interrupts in order to calculate speed. boolean check; boolean start; unsigned int angle = 5; //angle moved…
TechPakoray
  • 51
  • 1
  • 2
5
votes
2 answers

Current Arduino STL Libraries

I was going to update this question but I thought that this was different. I have been trying to get std::vector to work with the latest Arduino. I have tried downloading several libraries found online but I can not get one of them to compile…
Andy Braham
  • 468
  • 1
  • 8
  • 17
5
votes
1 answer

Is it possible to have an array of int arrays?

I have a huge number of arrays, each with a series of numbers each referring to an LED on a strip. I want to be able to address each one by a number, so the logical solution to that for me was to make the whole thing into an array. Can that be done,…
mr-matt
  • 147
  • 1
  • 4
  • 15
5
votes
2 answers

Do I need 3 voltage dividers to control ESP8266

I am buying an ESP8266 and the plan is to control it serially from an Arduino. I am going to use a voltage divider(Using a voltage divider is temporary and I know the cons of using voltage dividers). I calculated out the values of the voltage…
Clayton
  • 83
  • 1
  • 2
  • 8