Hello
Today we have good news about our progress in RingPico development and using Ring 1.21 on Raspberry Pi Pico (Microcontroller)
We added a lot of functions to the extension!
Also, we provided some examples including an example about using Declarative Programming
Screen Shot:
Description (Using Copilot):
Loading the Circuit Library: The code starts by loading a library called circuit.ring, which contains definitions and functions for handling circuits.
Defining Pins:
SWITCH_PIN = 14: This sets the pin number 14 as the switch pin.
LED_PIN = 15: This sets the pin number 15 as the LED pin.
Main Function: The main function contains the main logic of the program.
Circuit Block: This block defines the circuit configuration.
LED Block:
Pin = PICO_DEFAULT_LED_PIN: This sets the default LED pin for the Raspberry Pi Pico.
Blink = True: This enables the blinking of the LED.
Delay = 0.1: This sets the blink delay to 0.1 seconds.
LEDSwitch Block:
Pin = SWITCH_PIN: This sets the switch pin to the previously defined SWITCH_PIN (pin 14).
Nested LED Block:
Pin = LED_PIN: This sets the LED pin to the previously defined LED_PIN (pin 15).
Blink = True: This enables the blinking of the LED.
Delay = 3: This sets the blink delay to 3 seconds.
In summary, this program configures two LEDs on a Raspberry Pi Pico. One LED blinks with a delay of 0.1 seconds, and another LED, controlled by a switch on pin 14, blinks with a delay of 3 seconds.
Source Code:
Greetings,
Mahmoud