devices = {
'BTN1' : { 'pin' : 'D38' }, # the button is at P1.06
'LED1' : { 'pin' : 'D6' }, # green LED
'LED2' : { 'pin' : 'D8' }, # RGB LED / red P0.08
'LED3' : { 'pin' : 'D41' }, # RGB LED / green P1.09
'LED4' : { 'pin' : 'D12' }, # RGB LED / blue P0.12
'RX_PIN_NUMBER' : { 'pin' : 'D13'},
'TX_PIN_NUMBER' : { 'pin' : 'D15'},
};
Right ?
I will want to map
GPIO_1 to GPIO_52 names to the NINA B302
For example,
GPIO_1 will be the physical pin P0.13
GPIO_2 will be the physical pin P0.14
and soon
How can i define one of those..
What is D38, D6, etc ?
For example, is D0 mapped as P0.0, D1 mapped as P0.1 ?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
:)
The main is change
devices = {
'BTN1' : { 'pin' : 'D38' }, # the button is at P1.06
'LED1' : { 'pin' : 'D6' }, # green LED
'LED2' : { 'pin' : 'D8' }, # RGB LED / red P0.08
'LED3' : { 'pin' : 'D41' }, # RGB LED / green P1.09
'LED4' : { 'pin' : 'D12' }, # RGB LED / blue P0.12
'RX_PIN_NUMBER' : { 'pin' : 'D13'},
'TX_PIN_NUMBER' : { 'pin' : 'D15'},
};
Right ?
I will want to map
GPIO_1 to GPIO_52 names to the NINA B302
For example,
GPIO_1 will be the physical pin P0.13
GPIO_2 will be the physical pin P0.14
and soon
How can i define one of those..
What is D38, D6, etc ?
For example, is D0 mapped as P0.0, D1 mapped as P0.1 ?
1 Attachment