Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions tests/scenarios/board_leds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
type: board
name: "board_leds"

tests:
- name: "LED RED on/off"
action: hardware_script
pre_prompt: "Appuyez sur Entrée pour lancer le test LED RGB, puis observez la carte."
script: |
Comment thread
nedseb marked this conversation as resolved.
Comment thread
nedseb marked this conversation as resolved.
from machine import Pin
from time import sleep_ms
led = Pin("LED_RED", Pin.OUT)
led.on()
sleep_ms(1000)
led.off()
result = True
expect_true: true
mode: [hardware]

- name: "LED RED visible"
action: manual
prompt: "La LED rouge s'est-elle allumée puis éteinte ?"
expect_true: true
mode: [hardware]

- name: "LED GREEN on/off"
action: hardware_script
script: |
Comment thread
nedseb marked this conversation as resolved.
from machine import Pin
from time import sleep_ms
led = Pin("LED_GREEN", Pin.OUT)
led.on()
sleep_ms(1000)
led.off()
result = True
expect_true: true
mode: [hardware]

- name: "LED GREEN visible"
action: manual
prompt: "La LED verte s'est-elle allumée puis éteinte ?"
expect_true: true
mode: [hardware]

- name: "LED BLUE on/off"
action: hardware_script
script: |
Comment thread
nedseb marked this conversation as resolved.
from machine import Pin
from time import sleep_ms
led = Pin("LED_BLUE", Pin.OUT)
led.on()
sleep_ms(1000)
led.off()
result = True
expect_true: true
mode: [hardware]

- name: "LED BLUE visible"
action: manual
prompt: "La LED bleue s'est-elle allumée puis éteinte ?"
expect_true: true
mode: [hardware]

- name: "RGB LED full cycle"
Comment thread
nedseb marked this conversation as resolved.
action: hardware_script
script: |
from machine import Pin
from time import sleep_ms
r = Pin("LED_RED", Pin.OUT)
g = Pin("LED_GREEN", Pin.OUT)
b = Pin("LED_BLUE", Pin.OUT)
for led in [r, g, b]:
led.on()
sleep_ms(500)
led.off()
# White = all on
r.on(); g.on(); b.on()
sleep_ms(500)
r.off(); g.off(); b.off()
Comment thread
nedseb marked this conversation as resolved.
result = True
expect_true: true
mode: [hardware]

- name: "RGB LED full cycle visible"
action: manual
prompt: "La LED a-t-elle affiché rouge, vert, bleu, puis blanc ?"
expect_true: true
mode: [hardware]

- name: "LED BLE on/off"
Comment thread
nedseb marked this conversation as resolved.
action: hardware_script
pre_prompt: "Appuyez sur Entrée pour lancer le test LED BLE, puis observez la carte."
script: |
from machine import Pin
from time import sleep_ms
led = Pin("LED_BLE", Pin.OUT)
led.on()
sleep_ms(1000)
led.off()
result = True
expect_true: true
mode: [hardware]

- name: "LED BLE visible"
action: manual
prompt: "La LED BLE (bleue) s'est-elle allumée puis éteinte ?"
expect_true: true
mode: [hardware]