Skip to content

Commit

Permalink
adds codal beta, first tests with power management
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianhugo committed Dec 4, 2024
1 parent 92f3b82 commit ffc40ed
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 11 deletions.
4 changes: 2 additions & 2 deletions codal.ble.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"target": {
"name": "codal-microbit-v2",
"url": "https://github.com/calliope-edu/codal-microbit-v2/tags",
"branch": "v0.2.68-calliope-rc1",
"url": "https://github.com/calliope-edu/codal-microbit-v2",
"branch": "v0.2.68-calliope-rc1b",
"type": "git"
} ,
"config":{
Expand Down
4 changes: 2 additions & 2 deletions codal.dev.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"target": {
"name": "codal-microbit-v2",
"url": "https://github.com/calliope-edu/codal-microbit-v2/tags",
"branch": "v0.2.68-calliope-rc1",
"url": "https://github.com/calliope-edu/codal-microbit-v2",
"branch": "v0.2.68-calliope-rc1b",
"type": "git",
"dev": true
},
Expand Down
4 changes: 2 additions & 2 deletions codal.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"target": {
"name": "codal-microbit-v2",
"url": "https://github.com/calliope-edu/codal-microbit-v2/tags",
"branch": "v0.2.68-calliope-rc1",
"url": "https://github.com/calliope-edu/codal-microbit-v2",
"branch": "v0.2.68-calliope-rc1b",
"type": "git"
},
"config":{
Expand Down
29 changes: 27 additions & 2 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,34 @@ MicroBit uBit;
int main()
{
uBit.init();

const char * const happy_emoji ="\
000,255,000,255,000\n\
000,000,000,000,000\n\
255,000,000,000,255\n\
000,255,255,255,000\n\
000,000,000,000,000\n";
MicroBitImage smile(happy_emoji);

out_of_box_experience();
ManagedBuffer b(3*3);
b.fill(0);


b[0]=32; //turns 1st LED green
b[4]=32; //turns 2nd LED red
b[8]=32; //turns 3rd LED blue
neopixel_send_buffer(uBit.io.RGB, b);

microbit_panic( 999 );
uBit.display.scroll("hi");
uBit.display.print(smile);
uBit.sleep(1000);
version_test();
// uBit.power.deepSleepAll();
while(1){

}
// out_of_box_experience();

// microbit_panic( 999 );
}

12 changes: 9 additions & 3 deletions source/samples/GPIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ Pin *edgeConnector[] = {
&uBit.io.P13,
&uBit.io.P14,
&uBit.io.P15,
&uBit.io.P16,
&uBit.io.P19,
&uBit.io.P20
&uBit.io.A1RX,
&uBit.io.A1TX,
&uBit.io.P18,
&uBit.io.A0SCL,
&uBit.io.A0SDA,
&uBit.io.M_A_IN1,
&uBit.io.M_A_IN2,
&uBit.io.M_B_IN1,
&uBit.io.M_B_IN2
};

//Pin *analogPins[] = {&uBit.io.P1, &uBit.io.P2};
Expand Down

0 comments on commit ffc40ed

Please sign in to comment.