Posted by on December 14, 2018, modified on December 14, 2018
Datasheet
Language Reference
flash-memory based strings
使用F()
將字串存在Flash上面。
Serial.print(F(“Hello World”));
Ctags Recognizes .ino for C++ Format
ctags -R --langmap=C++:+.ino --verbose `pwd`
Serial Plotter Sample Code
Use analog input A0
to sniffer signal from 0~5(V)
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(A0,INPUT);
}
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):0);
// Convert the analog reading
float voltage = sensorValue * (5.0 / 1023.0) * 100;
// print out the value you read:
Serial.print(0);
Serial.print(" ");
Serial.print(1000);
Serial.print(" ");
Serial.print(voltage);
Serial.println(" ");
}