基本範例
There are many built-in examples in Arduino. In the table below, we list all examples that are compatible with Ameba.
Category |
Name |
Comment |
|---|---|---|
|
AnalogReadSerial |
Connect potentiometer to 3.3V |
BareMinimum |
||
Blink |
Connect LED to pin 8 |
|
DigitalReadSerial |
||
Fade |
||
ReadAnalogVoltage |
ADC can read a maximum of 3.3V. |
|
|
BlinkWithoutDelay |
Connect LED to pin 8 |
Button |
Connect LED to pin 13 |
|
Debounce |
Connect LED to pin 13 |
|
DigitalInputPullup |
Connect LED to pin 13 |
|
StateChangeDetection |
Connect LED to pin 13 |
|
toneKeyboard |
||
toneMelody |
||
toneMultiple |
||
tonePitchFollower |
||
|
AnalogInOutSerial |
|
AnalogInput |
Connect LED to pin 13 |
|
Analog Write Mega |
||
Calibration |
Connect another LED to pin 13 |
|
Fading |
||
Smoothing |
||
|
ASCIITable |
|
Dimmer |
Use serial baud rate 115200 |
|
Graph |
Use serial baud rate 115200, Connect potentiometer to 3.3V |
|
Midi |
Please use Serial1 and pin 26, or use Serial2 and pin 17 |
|
MultiSerial |
||
PhysicalPixel |
Use serial baud rate 115200 |
|
ReadASCIIString |
||
SerialCallResponse |
Use serial baud rate 115200 |
|
Se rialCallResponseASCII |
Use serial baud rate 115200 |
|
SerialEvent |
||
SerialPassthrough |
||
VirtualColorMixer |
Use serial baud rate 115200 |
|
|
Arrays |
Use pins 1, 2, 3, 4, 5, 6 |
ForLoopIteration |
Use pins 1, 2, 3, 4, 5, 6 |
|
I fStatementConditional |
||
switchCase |
||
switchCase2 |
||
Whil eStatementConditional |
Connect another LED to pin 13 |
|
|
barGraph |
Use another pin to replace pin 7 |
RowColumnScanning |
||
|
CharacterAnalysis |
|
S tringAdditionOperator |
||
StringAppendOperator |
||
StringCaseChanges |
||
StringCharacters |
||
Stri ngComparisonOperators |
||
StringIndexOf |
||
StringLength |
||
StringLengthTrim |
||
StringReplace |
||
Str ingStartsWithEndsWith |
||
StringSubstring |
||
StringToInt |