Skip to main content

Questions tagged [coding-standards]

-1 votes
1 answer
412 views

I'm working on a project and it can send to one receiver only. What I need is to send a message to multiple receivers. I need a code sample that would satisfy my needs. Please help! I need to finish ...
2 votes
1 answer
90 views

Code 1 (here unsigned long currentmillis = millis() is in loop area): const int LED = 2; unsigned long previousmillis = 0 ; const long delaytime = 1500; int ledstate = HIGH; void setup() { pinMode(...
12 votes
1 answer
11k views

The "Arduino language" (as they call it) of the Arduino IDE 1 is obviously C++. Which C++ exactly? I tried to figure it out myself (Arduino IDE 1.8.13 for Arduino Uno), but I can't conclude ...
32 votes
4 answers
60k views

Arduino is an odd hybrid, where some C++ functionality is used in the embedded world—traditionally a C environment. Indeed, a lot of Arduino code is very C like though. C has traditionally used #...
1 vote
0 answers
64 views

I wanted the sensor to be high when I press the button, but when DigitalRead does low, the LED turns on, when it does high, the LED goes off. Whereas when the digitalRead is high, isn't it supposed to ...
1 vote
3 answers
174 views

I am working with some sensors and sending data to a public web server via http, I was thinking this server can be possibly used by more people to send their data and server displays a chart. I was ...
1 vote
1 answer
335 views

I'm new to Arduino but I'm an experienced programmer. I'm wondering if there are any common functions for reporting errors in Arduino programs? For example, in JavaScript we have the alert() function, ...
2 votes
3 answers
132 views

My project has 4 float switches, 2 valves and 3 pumps. I created a sketch and uploaded it. But my project keep all "OUTPUT" at "HIGH" all the time. I couldn't find what the problem, can you help? ...
0 votes
1 answer
90 views

The Arduino Switch Case Reference has a switch structure written two different ways: First in the Syntax as: switch (var) { case label1: // statements break; case label2: // ...
-1 votes
3 answers
497 views

I am having trouble with this code: #include <Wire.h> #include <MPU6050.h> MPU6050 mpu; // Timers unsigned long timer = 0; float timeStep = 0.01; // Pitch, Roll and Yaw values float ...
0 votes
2 answers
182 views

I am working on a project with an Arduino Uno. I want to know if the latitudes and longitudes can be input to the Arduino for the Arduino to move to that particular location. If it's possible then ...
1 vote
5 answers
3k views

Do Arduinos meet military standards? If not, where does it fall short? Is it something internal to the chip which might be corrected via external circuit? How could I evaluate the potential of a ...
29 votes
8 answers
21k views

I'm relatively new at programming and many of the coding best practices I'm reading effectively state that there are very few good reasons to use a global variable (or that the best code has no ...
0 votes
2 answers
114 views

I have a have project of Up Down counter using Arduino with seven segments, in which when I continuously press the push button, the counter moves upward from 0 to 99. When I release the push button, ...
0 votes
2 answers
381 views

I am trying to create a stable communication channel without any mis-synchronization. In the SoftwareSerial library, the write function transmits one byte at a time. The mis-synchronization occurs ...

15 30 50 per page