Cam 1: Gwneud
Beth yw e?
Defnyddiwch dolen wedi'i rheoli gan cyfri a dilyniant i gynorthwyo creu prosiect rheolwaith dawns ar eich BBC micro:bit. Gallech ddefnyddio'r prosiect hon ar ben eich hun neu gyda ffrindiau.
Mae'r ddau fideo hyn yn dangos i chi yr hyn y byddwch yn ei greu a sut i'w godio:
Sut mae'n gweithio
- Mae'r rhaglen yn cychwyn pan ydych chi'n pwyso botwm A.
 - Arrows appear on the micro:bit’s LED display, which tell you how to dance – step left then right, put your hands up in the air, then point down to the floor.
 - Os ydych chi'n defnyddio'r prosiect mewn grwp, dyler pawb bwyso'r botwm A ar eu micro:bits ar yr un amser, fel eich bod yn cychwyn y rheolwaith dawns ar yr un amser ac yn cadw mewn sync.
 - After showing each image, the program pauses for a second (1000 milliseconds) before showing the next image. Mae'r saib yn helpu pawb i gadw mewn amser.
 - Mae'r dilyniant o gamau dawns yn ail-adrodd pedwar amser ac wedyn yn stopio. The sequence is kept going using a count-controlled loop. Count-controlled loops repeat instructions a set number of times.
 - Using loops to keep things happening is an important idea in computer programming. Galwn hyn hefyd yn iteriad.
 - Pan mae'r rheolwaith wedi gorffen, byddai arddangosydd LED y micro:bit yn clirio.
 
Beth sydd ei angen arnoch
- micro:bit (neu efelychwr MakeCode)
 - Golygydd MakeCode
 - becyn patri (argymhellir)
 - LED planning sheet (optional)
 
Cam 2: Codio
1# Imports go at the top
2from microbit import *
3
4
5while True:
6    if button_a.is_pressed():
7        for i in range(4):  
8            display.show(Image('00900:'
9                       '09000:'
10                       '99999:'
11                       '09000:'
12                       '00900'))
13            sleep(1000)
14            display.show(Image('00900:'
15                       '00090:'
16                       '99999:'
17                       '00090:'
18                       '00900'))
19            sleep(1000)
20            display.show(Image('00900:'
21                       '09990:'
22                       '90909:'
23                       '00900:'
24                       '00900'))
25            sleep(1000)
26            display.show(Image('00900:'
27                       '00900:'
28                       '90909:'
29                       '09990:'
30                       '00900'))
31            sleep(1000)
32    display.clear()
33Cam 3: Gwella
- Make instructions for other dance sequences to appear when you use other inputs such as pressing button B or shaking the micro:bit.
 - Newidiwch hyd y seibiant i wneud i'r rhaglen redeg mewn amser gyda eich hoff gân.
 - Use this project alongside the step counter project to monitor how well you dance.
 

