diff --git a/Pico-2W-pinout.png b/Pico-2W-pinout.png new file mode 100644 index 0000000..722634c Binary files /dev/null and b/Pico-2W-pinout.png differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..d82b82e --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Blink +A multicore program for Raspberry Pi Pico 2 W using **Arduino framework**. + +## Dependencies + +- Arduino IDE +- [earlephilhower/arduino-pico](https://github.com/earlephilhower/arduino-pico) + - See [Installation instructions](https://arduino-pico.readthedocs.io/en/latest/install.html) + +## Program + +### Core 0 +Blink + +### Core 1 +Servo \ No newline at end of file diff --git a/blink-pico-arduino.ino b/blink-pico-arduino.ino new file mode 100644 index 0000000..c0a9c39 --- /dev/null +++ b/blink-pico-arduino.ino @@ -0,0 +1,17 @@ +/* + * Running on core0. + */ + +void setup() { + // put your setup code here, to run once: + pinMode(LED_BUILTIN, OUTPUT); +} + +void loop() { + // put your main code here, to run repeatedly: + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(250); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(250); // wait for a second + +} diff --git a/core2.ino b/core2.ino new file mode 100644 index 0000000..41ed4c7 --- /dev/null +++ b/core2.ino @@ -0,0 +1,19 @@ +/* + * Running on core1. + */ + +#include + +Servo servo1; +int pos; + +void setup1() { + servo1.attach(D1, 540, 2400); // min/max pulse width in ms (1e-6) +} + +void loop1() { + for(pos = 0; pos <= 180; pos += 10) { + servo1.write(pos); + delay(1000); + } +} diff --git a/pico-2-w-datasheet.pdf b/pico-2-w-datasheet.pdf new file mode 100644 index 0000000..3cde5a0 Binary files /dev/null and b/pico-2-w-datasheet.pdf differ