Ring 1.21 on Raspberry Pi Pico (Microcontroller) - Progress Report

51 views
Skip to first unread message

Mahmoud Fayed

unread,
Aug 7, 2024, 1:20:48 AM8/7/24
to The Ring Programming Language
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:
demo.png

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

Mansour Ayouni

unread,
Aug 7, 2024, 2:20:45 AM8/7/24
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

This is awesome! Declarative really turns out great on microcontrollers...

Keep it up!!

Best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/969b906f-0148-4680-bd4e-f01ddaa1402bn%40googlegroups.com.

Mahmoud Fayed

unread,
Aug 7, 2024, 2:31:41 AM8/7/24
to The Ring Programming Language
Hello Mansour

>> "This is awesome! Declarative really turns out great on microcontrollers..."

Thanks, Also, when we bring PWCT2 (Visual Programming) support, it will become more easy!

Greetings,
Mahmoud
Reply all
Reply to author
Forward
0 new messages