diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 37605f2..5e5bfa8 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -48,6 +48,10 @@ jobs: sketch-paths: | - examples/Dual Core Processing/BlinkGreenLed_M4 + - fqbn: arduino:mbed_edge:edge_control + sketch-paths: | + - examples/Edge Control Getting Started + steps: - name: Checkout uses: actions/checkout@v2 @@ -62,6 +66,7 @@ jobs: - source-path: ./ # Install library dependencies. - name: ArduinoBLE + - name: Arduino_EdgeControl sketch-paths: | # Sketches to compile for all boards diff --git a/examples/Edge Control Getting Started/Edge Control Getting Started.ino b/examples/Edge Control Getting Started/Edge Control Getting Started.ino new file mode 100644 index 0000000..19caaf5 --- /dev/null +++ b/examples/Edge Control Getting Started/Edge Control Getting Started.ino @@ -0,0 +1,30 @@ +#include <Arduino_EdgeControl.h> + +void setup() { + Serial.begin(9600); + + // Set the timeout + auto startNow = millis() + 2500; + while (!Serial && millis() < startNow); + Serial.println("Hello, Edge Control Sketch!"); + + // Enable power lines + Power.enable3V3(); + Power.enable5V(); + + // Start the I2C connection + Wire.begin(); + + // Initialize the expander pins + Expander.begin(); + Expander.pinMode(EXP_LED1, OUTPUT); +} + +void loop() { + // put your main code here, to run repeatedly: + Serial.println("Blink"); + Expander.digitalWrite(EXP_LED1, LOW); + delay(500); + Expander.digitalWrite(EXP_LED1, HIGH); + delay(500); +} \ No newline at end of file