Download en installeer cppcheck, en gebruik deze command line:
cppcheck --enable=style *.ino
Download en installeer cppcheck, en gebruik deze command line:
cppcheck --enable=style *.ino
Version control and tracking is hard.
For sure in the Arduino IDE, which invites to rapid prototyping and has no built-in version tracking or version control mechanism.
To make it somewhat more practical and less error prone I made some scripts to assist this process.
It works if you already use or start using git for your version control.
Using these scripts is as easy as adding them to your sketch folder and adding
#include "gitTagVersion.h" ... Serial.println( sketchVersion );
to your Arduino sketch.
That is all that is needed.
The output in the example above will be something like v1.0.0-3-gab3fb04
.
That breaks down to tag v1.0.0, 3 commits since that tag, at commit ab3fb04.
Iets als dit regelt de NTP update in de aquacontrol software:
// wait a specific interval, accounting for rollover with subtraction! unsigned long timerInterval = 50; // this is the interval in milliseconds unsigned long nextTimer = millis() + timerInterval; void loop() { lastMillis = millis(); if ( ( long ) ( millis() - nextTimer ) >= 0 ) { Serial.println( "Interval has passed." ); nextTimer += timerInterval; //do some more stuff... } //rest of the main loop }
Alles nur geklaut:
http://playground.arduino.cc/Code/TimingRollover
Vandaag gaf de Arduino IDE (1.8.1) hardnekkig de volgende foutmelding bij elke upload:
warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed
Als deze foutmelding het plezier met de Arduino IDE verpest ben je waarschijnlijk een non-root gebruiker. Die hebben standaard geen toegang tot de seriële poort.
Lossen we op door de gebruiker aan de group
dialout
toe te voegen:
sudo usermod -a -G dialout username
Reboot de machine en het zou nu moeten werken.