Skip to main content

Questions tagged [coding-standards]

Filter by
Sorted by
Tagged with
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(...
Arduino Newbie's user avatar
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 ...
Thomas Weller's user avatar
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 ...
Sabri73's user avatar
  • 51
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 ...
adrianTNT's user avatar
  • 252
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, ...
Brian Slesinsky's user avatar
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? ...
user56886's user avatar
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: // ...
ATE-ENGE's user avatar
  • 941
-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 ...
arg3t's user avatar
  • 31
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 ...
Nimish's user avatar
  • 11
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 ...
ATE-ENGE's user avatar
  • 941
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, ...
Abdul Basit's user avatar
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 ...
Jonathan's user avatar
  • 264
2 votes
0 answers
185 views

In the VirtualWire library, it is possible to encode the clock signal as the library is doing with 4b/6b coding. This is possible because VirtualWire uses convolutinal coding, where the information is ...
Jonathan's user avatar
  • 264
2 votes
2 answers
7k views

I have an Arduino. I'm not sure if RX1 and TX0 the same thing as TX and RX? Will there be a difference in the way I program it? For example, do I treat RX1 and TX0 as RX and TX in the Arduino IDE ...
JoeB's user avatar
  • 51
-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 ...
dawn's user avatar
  • 9
0 votes
2 answers
2k views

I'm trying to write into a file using this code from the example of the library: String dataString = ""; int sensor = 0; dataString += String(sensor); dataString += ","; sensor +=1; File dataFile = ...
Facorazza's user avatar
  • 439
0 votes
1 answer
1k views

I'm starting a decently sized project around arduino/ATMELavr, and I came to wonder if there are any commonly accepted C/C++ coding standards or style guidelines specifically aimed at embedded C++/...
Laurent S's user avatar
  • 103
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 ...
sean's user avatar
  • 131
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 #...
Cybergibbons's user avatar
  • 5,430