// * Print a string to the TX pin of the Serial Port.
// * Blink the LED built into the Pico board.
// * Blink an external blue LED connected to GP22.
// * Author: GoblinSailor 12/26/2022
//The blue LED is connected to GP22...
const int external_blue_led = 22;
void setup() {
// put your setup code here, to run once:
//The 1 means use the built in RS232 Serial TX pin. Without the 1 you would
//be operating like an arduino and trying to print over the USB port.
Serial1.begin(115200);
Serial1.println("Hello, Raspberry Pi Pico! Blinking built in and external LEDs.");
//Define two GPIO pins on the Pico board as outputs.
pinMode(LED_BUILTIN, OUTPUT);
pinMode(external_blue_led, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
//Toggle both LEDs high (3.3V on pico) and low (0v)
digitalWrite(LED_BUILTIN, HIGH);
digitalWrite(external_blue_led, HIGH);
delay(1000); // Delay for 1 second = 1000 milli-seconds
digitalWrite(LED_BUILTIN, LOW);
digitalWrite(external_blue_led, LOW);
delay(1000);
}