Skip to content

Commit

Permalink
Merge branch cpmini into y
Browse files Browse the repository at this point in the history
  • Loading branch information
Amerlander committed Sep 13, 2023
2 parents ded933b + 9befbbd commit 2ca1c80
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
3 changes: 1 addition & 2 deletions model/MicroBitIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ MicroBitIO::MicroBitIO(NRF52ADC &a, TouchSensor &s) :
P0(ID_PIN_P0, P0_02, PIN_CAPABILITY_AD),
P1(ID_PIN_P1, P0_03, PIN_CAPABILITY_AD),
P2(ID_PIN_P2, P0_04, PIN_CAPABILITY_AD),
/// P3(ID_PIN_P3, P0_31, PIN_CAPABILITY_AD),
P3(ID_PIN_P3, P1_03, PIN_CAPABILITY_AD), //[Calliope] connect PAD3 (P1_03) : DELETE
P4(ID_PIN_P4, P0_28, PIN_CAPABILITY_AD),
P5(ID_PIN_P5, P0_14, PIN_CAPABILITY_AD),
Expand Down Expand Up @@ -109,7 +108,7 @@ MicroBitIO::MicroBitIO(NRF52ADC &a, TouchSensor &s) :
buttonB(P11),
face(logo)
{
pins = 33;
pins = 41;
NRF52Pin::adc = &a;
NRF52Pin::touchSensor = &s;

Expand Down
24 changes: 13 additions & 11 deletions model/MicroBitIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ typedef enum {
#define MICROBIT_PIN_P0 P0_02
#define MICROBIT_PIN_P1 P0_03
#define MICROBIT_PIN_P2 P0_04
/// #define MICROBIT_PIN_P3 P0_31
#define MICROBIT_PIN_P3 P1_03 //[Calliope] connect PAD3 P1_03 : DELETE
#define MICROBIT_PIN_P4 P0_28
#define MICROBIT_PIN_P5 P0_14
Expand All @@ -237,23 +236,17 @@ typedef enum {
#define MICROBIT_PIN_P13 P0_17
#define MICROBIT_PIN_P14 P0_01
#define MICROBIT_PIN_P15 P0_13
/// #define MICROBIT_PIN_P16 P1_02
#define MICROBIT_PIN_P16 P0_29 //[Calliope] connect Grove Analog PIN (P0_29) : DELETE
#define MICROBIT_PIN_P17 P1_02 //[Calliope]
#define MICROBIT_PIN_P18 P0_31 //[Calliope]
#define MICROBIT_PIN_P19 P0_26
/// #define MICROBIT_PIN_P20 P1_00
#define MICROBIT_PIN_P20 P1_00 //[Calliope] Place holder for micro:bit pin P3 (P0_31) : DELETE
#define MICROBIT_PIN_P18 P0_31 //[Calliope]#define MICROBIT_PIN_P19 P0_26
#define MICROBIT_PIN_P20 P1_00

// Calliope mini3
#define MICROBIT_PIN_RGB P0_07 // RGB
#define MICROBIT_PIN_M_A_IN1 P1_01 // Motor A IN1
#define MICROBIT_PIN_M_A_IN2 P0_27 // Motor A IN2
#define MICROBIT_PIN_M_B_IN1 P1_07 // Motor B IN1
#define MICROBIT_PIN_M_B_IN2 P1_09 // Motor B IN2
#define MICROBIT_PIN_M_MODE P1_06 // Motor Mode
//#define MICROBIT_PIN_PAD3 P1_03 // PAD 3
//#define MICROBIT_PIN_GA0 P0_29 // Grove Analog

// User Input
#define MICROBIT_PIN_BUTTON_A P0_14
Expand Down Expand Up @@ -363,8 +356,6 @@ typedef enum {
//#define ID_PIN_PAD3 (DEVICE_ID_IO_P0 + 57) // PAD3
//#define ID_PIN_GA0 (DEVICE_ID_IO_P0 + 58) // Grove Analog



// For MakeCode extension compat. Delete ASAP.
#define ID_PIN_FACE (ID_PIN_LOGO)

Expand Down Expand Up @@ -434,6 +425,7 @@ namespace codal




// Other exposed pins
NRF52Pin logo; // P1_04

Expand All @@ -452,6 +444,16 @@ namespace codal
NRF52Pin usbRx;
NRF52Pin irq1; // P0_25

//Calliope mini3
NRF52Pin RGB; // RGBLED P0_07
NRF52Pin M_A_IN1; // Motor A IN1 P1_01
NRF52Pin M_A_IN2; // Motor A IN2 P0_27
NRF52Pin M_B_IN1; // Motor B IN1 P1_07
NRF52Pin M_B_IN2; // Motor B IN2 P1_09
NRF52Pin M_MODE; // Motor Mode P1_06
//NRF52Pin PAD3; // PAD 3 P1_03
//NRF52Pin GA0; // Grove Analog P0_29

// Aliases
NRF52Pin& col1;
NRF52Pin& col2;
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"dependencies": {
"codal-core": "[email protected]:calliope-edu/codal-core.git#mini3_proto2",
"codal-nrf52": "[email protected]:microbit-foundation/codal-nrf52.git#master",
"codal-nrf52": "[email protected]:lancaster-university/codal-nrf52.git#master",
"codal-microbit-nrf5sdk": "[email protected]:microbit-foundation/codal-microbit-nrf5sdk.git#master"
},
"targetDependencies": {},
Expand Down

0 comments on commit 2ca1c80

Please sign in to comment.