Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 19667

The process of designing and writing source code as part of a program (or sketch) for Arduino. For questions about uploading code to an Arduino board, use the [uploading] tag instead.

1 vote
1 answer
54 views

Compiler doesn't like function code

I am getting this error from the Visual Studio compiler (I use the Visual Studio add-in Visual Micro for Arduino). ModelRailroadCrossingSignalController.ino:In function 'void loop() ModelRailroa …
dinotom's user avatar
  • 360
2 votes
Accepted

using enums in functions

The solution was to move the enum declarations to a header file, due to the fact this was a VM add-in issue which will be resolved once they've implemented arduino version 1.6.8. Adding this code to …
dinotom's user avatar
  • 360
2 votes
3 answers
2k views

Proper way to run functions in loop

I am having a problem getting my functions to run properly from the loop. I am building a model railroad crossing gate and need to run the 4 processes once the sensor signals the train entering the c …
dinotom's user avatar
  • 360
1 vote
4 answers
3k views

Proper error logging using Arduino

Coming from a C# background where I do logs for every application, and given that I will be using the Mega for most projects and therefore have the memory available to do so, I want to incorporate err …
dinotom's user avatar
  • 360
4 votes
2 answers
23k views

using enums in functions

Given the following enums enum RelayState { RELAY_OFF = HIGH, RELAY_ON = LOW }; enum class CrossingZoneState: uint8_t { CROSSINGZONE_CLEAR = 0, // no train in crossing area, also initialized stat …
dinotom's user avatar
  • 360
-1 votes

Employing C++ code for Arduino

Use the Visual Studio free community edition (or the paid versions if you already have them) with the Visual Micro extension for Arduino. Makes life a lot easier since you have indicated your desire t …
dinotom's user avatar
  • 360