Arduino-build-in example
bw16 Type C Supported ARDUINO built-in example table
There are many built-in examples in Arduino. All examples that listed are compatible with Ameba.
Category |
Name |
Comment |
Remarks |
---|---|---|---|
Basics |
AnalogReadSerial |
Connect potentiometer to 3.3V
ADC pin used, up to 3.3V
and can be alibrated by using
analogSet(float gain, float offset)
|
ADC pin options A2 (PB3).
ADC pin reading voltage range 0 to 3.3V
ADC value can be calibrated by
modifying _offset and _gain
using 2 points calibration method.
analogSet(float gain, float offset)
can be used to update the calibrated offset
and gain values
|
BareMinimum |
|||
Blink |
LED_BUILTIN sets to
LED_G (on-board LED blue)
|
LED options, on-board LED, LED_R (Red),
LED_B (Blue) or LED_G (Green).
LED_B and LED_G are PWM capable LED.
|
|
DigitalReadSerial |
|||
Fade |
For “analogWrite()”, use PWM capable pin.
|
PWM capable Pin 3, 7, 8, 11 and 12.
|
|
ReadAnalogVoltage |
ADC pin used, up to 3.3V
and can be calibrated by using
analogSet(float gain, float offset)
|
||
Digital |
BlinkWithoutDelay |
LED_BUILTIN sets to
LED_B (on-board LED blue)
|
LED options, on-board LED |
Button |
Replace any Pin that sets beyond Pin 0 to 12. |
||
Debounce |
|||
DigitalInputPullup |
|||
StateChangeDetection |
|||
toneKeyboard |
ADC pin used, up to 3.3V
and can be calibrated by
using analogSet(float gain, float offset)
For analogRead(), use ADC pin name
(A2) instead the integer number
For “tone()” and “noTone()”,
use PWM capable pin
|
||
toneMelody |
|||
toneMultiple |
|||
tonePitchFollower |
|||
Analog |
AnalogInOutSerial |
ADC pin used, up to 3.3V
and can be calibrated by using
analogSet(float gain, float offset)
For analogWrite(),
use PWM capable pin
Replace any Pin that
sets beyond Pin 0 to 12.
|
LED options, on-board LED
LED_B and LED_G are PWM capable LED.
|
AnalogInput |
|||
AnalogWriteMega |
|||
Calibration |
|||
Fading |
|||
Smoothing |
|||
Communication |
ASCIITable |
LED options, on-board LED
LED_B and LED_G are PWM capable LED.
|
|
Dimmer |
For “analogWrite()”,
use PWM capable pin.
|
||
Graph |
Connect potentiometer to 3.3V
ADC pin used, up to 3.3V
and can be calibrated by using
analogSet(float gain, float offset)
|
||
Midi |
Use Serial1, MIDI jack pin 5
connected to SERIAL1_TX
|
||
MultiSerial |
Required external USB-to-UART module. |
||
PhysicalPixel |
Replace any Pin that sets beyond Pin 0 to 12. |
||
ReadASCIIString |
For analogWrite(), use PWM capable pin |
||
SerialEvent |
|||
SerialPassthrough |
Required external USB-to-UART module. |
||
Control |
Arrays |
||
ForLoopIteration |
|||
IfStatementConditional |
ADC pin used, up to 3.3V
and can be calibrated by using
analogSet(float gain, float offset)
Replace any Pin that sets
beyond Pin 0 to 12.
|
LED options, on-board LED. |
|
switchCase |
ADC pin used, up to 3.3V |
||
switchCase2 |
|||
WhileStatementConditional |
ADC pin used, up to 3.3V
and can be calibrated by using
analogSet(float gain, float offset)
For analogWrite(),
use PWM capable pin
Replace any Pin that sets
beyond Pin 0 to 12.
|
LED options, on-board LED.
LED_B and LED_G are PWM capable LED.
|
|
Display |
barGraph |
ADC pin used, up to 3.3V
and can be calibrated by using
analogSet(float gain, float offset)
|
|
Strings |
CharacterAnalysis |
||
StringAdditionOperator |
|||
StringAppendOperator |
|||
StringCaseChanges |
|||
StringCharacters |
|||
StringComparisonOperators |
ADC pin used, up to 3.3V
and can be calibrated by using
analogSet(float gain, float offset)
|
||
StringIndexOf |
|||
StringLength |
|||
StringLengthTrim |
|||
StringReplace |
|||
StringStartsWithEndsWith |
|||
StringSubstring |
|||
StringToInt |