Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion docs/boards.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ This editor supports various maker boards, based on SAMD21, SAMD51, NRF52.
* imageUrl: /static/libs/redbear-ble-nano.jpg

---

* name: Arduino_lilypad
* url: /boards/Arduino_lilypad
* imageUrl: /static/libs/redbear-ble-nano.jpg
---
* name: Add your board
* url: /boards/add-a-new-board
* imageUrl: /static/libs/bead-servo.jpg
Expand Down
9 changes: 9 additions & 0 deletions docs/boards/arduino_lilypad.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```sim
forever(function() {

})
```

```package
Arduino-lilypad
```
Binary file added docs/static/libs/lily_board_bb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions libs/Arduino_lilypad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# arduino lily

The arduino library.

i reclaim no rights for this board- this is only for educational purpose
171 changes: 171 additions & 0 deletions libs/Arduino_lilypad/board .json
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
{
"driveDisplayName": "",
"visual": {
"image": "pkg://board.svg",
"useCrocClips": false,
"width": 208.2989959716797,
"height": 118.42015838623047,
"pinDist": 15,
"pinBlocks": [
{
"x": 132.46370717003558,
"y": 4.3731580708149,
"labels": [
"VBAT"
]
},
{
"x": 112.72703733849399,
"y": 4.3731580708149,
"labels": [
"GND"
]
},
{
"x": 92.99038595914656,
"y": 4.3731580708149,
"labels": [
"A4_D4_TX_MOSI"
]
},
{
"x": 73.25372535370205,
"y": 4.3731580708149,
"labels": [
"A3_D3_RX_SCK"
]
},
{
"x": 53.517050909111944,
"y": 102.85925227952634,
"labels": [
"3V3"
]
},
{
"x": 73.25372535370205,
"y": 102.85925227952634,
"labels": [
"A1_D2_SCL_MISO"
]
},
{
"x": 92.99038595914656,
"y": 102.85925227952634,
"labels": [
"A0_D1"
]
},
{
"x": 112.72703733849399,
"y": 102.85925227952634,
"labels": [
"A2_D0_SDA"
]
}
],
"leds": [
{
"x": 185.376333394688,
"y": 99.02860797644898,
"w": 6.217042416665318,
"h": 6.2170332202557015,
"color": "#ff0000",
"label": "LED"
},
{
"x": 92.0207047046369,
"y": 38.39268871460768,
"w": 11.120971341395725,
"h": 10.030683027224555,
"color": "neopixel",
"label": "NEOPIXEL"
}
],
"touchPads": [
{
"x": 92.99038595914656,
"y": 4.3731580708149,
"w": 11.385096048386105,
"h": 11.385112998295973,
"label": "A4"
},
{
"x": 73.25372535370205,
"y": 4.3731580708149,
"w": 11.385086822289031,
"h": 11.385112998295973,
"label": "A3"
},
{
"x": 92.99038595914656,
"y": 102.85925227952634,
"w": 11.385096048386105,
"h": 11.385094546074358,
"label": "A0"
}
],
"buttons": [],
"reset": {
"x": 17.83250718937794,
"y": 45.50404575993516,
"w": 13.596367783800709,
"h": 13.596390332336691
}
},
"gpioPinMap": {
"VBAT": "VBAT",
"GND": "GND",
"A4_D4_TX_MOSI": "A4_D4_TX_MOSI",
"A4": "A4_D4_TX_MOSI",
"D4": "A4_D4_TX_MOSI",
"TX": "A4_D4_TX_MOSI",
"MOSI": "A4_D4_TX_MOSI",
"JACK_TX": "A4_D4_TX_MOSI",
"A3_D3_RX_SCK": "A3_D3_RX_SCK",
"A3": "A3_D3_RX_SCK",
"D3": "A3_D3_RX_SCK",
"RX": "A3_D3_RX_SCK",
"SCK": "A3_D3_RX_SCK",
"3V3": "3V3",
"A1_D2_SCL_MISO": "A1_D2_SCL_MISO",
"A1": "A1_D2_SCL_MISO",
"D2": "A1_D2_SCL_MISO",
"SCL": "A1_D2_SCL_MISO",
"MISO": "A1_D2_SCL_MISO",
"A0_D1": "A0_D1",
"A0": "A0_D1",
"D1": "A0_D1",
"A2_D0_SDA": "A2_D0_SDA",
"A2": "A2_D0_SDA",
"D0": "A2_D0_SDA",
"SDA": "A2_D0_SDA",
"LED": "LED",
"RESET": "RESET",
"NEOPIXEL": "NEOPIXEL"
},
"groundPins": [
"GND"
],
"threeVoltPins": [
"3V3"
],
"i2cPins": {
"SDA": "SDA",
"SCL": "SCL"
},
"onboardComponents": [
"pixel"
],
"marginWhenBreadboarding": [
0,
0,
80,
0
],
"spiPins": {
"MOSI": "MOSI",
"MISO": "MISO",
"SCK": "SCK"
}
}
280 changes: 280 additions & 0 deletions libs/Arduino_lilypad/board.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
280 changes: 280 additions & 0 deletions libs/Arduino_lilypad/boardhd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions libs/Arduino_lilypad/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

namespace config {
export const PIN_ONBOARD_DOTSTAR_DATA = DAL.PA00;
export const PIN_ONBOARD_DOTSTAR_CLOCK = DAL.PA01;


export const PIN_D0 = DAL.PD0;
export const PIN_D1 = DAL.PD1;
export const PIN_D2 = DAL.PD2;
export const PIN_D3 = DAL.PD3;
export const PIN_D4 = DAL.PD4;
export const PIN_D5 = DAL.PD5;
export const PIN_D6 = DAL.PD6;
export const PIN_D7 = DAL.PD7;
export const PIN_D8 = DAL.PB0;
export const PIN_D9 = DAL.PB1;
export const PIN_D10 = DAL.PB2;
export const PIN_D11 = DAL.PB3;
export const PIN_D12 = DAL.PB4;
export const PIN_D13 = DAL.PB5;

export const PIN_A0 = PIN_PC0;
export const PIN_A1 = PIN_PC1;
export const PIN_A2 = PIN_PC2;
export const PIN_A3 = PIN_PC3;
export const PIN_A4 = PIN_PC4;
export const PIN_A5 = PIN_PC5;

export const PIN_LED = DAL.PD2;

export const PIN_SDA = PIN_A4;
export const PIN_SCL = PIN_A5;

export const PIN_SCK = PIN_D13;
export const PIN_MISO = PIN_D12;
export const PIN_MOSI = PIN_D11;

export const PIN_RX = PIN_D0;
export const PIN_TX = PIN_D1;

// not supported
export const PIN_JACK_TX = PIN_TX;
}
131 changes: 131 additions & 0 deletions libs/Arduino_lilypad/device.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
declare namespace pins {
//% fixedInstance shim=pxt::getPin(PIN_LED)
const LED: PwmOnlyPin;

//% fixedInstance shim=pxt::getPin(PIN_D0)
const D0: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D1)
const D1: AnalogOutPin;
//% fixedInstance shim=pxt::getPin(PIN_D2)
const D2: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D3)
const D3: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D4)
const D4: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D5)
const D5: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D6)
const D6: AnalogOutPin;
//% fixedInstance shim=pxt::getPin(PIN_D7)
const D7: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D8)
const D8: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D9)
const D9: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D10)
const D10: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D11)
const D11: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D12)
const D12: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_D13)
const D13: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_A0)
const A0: AnalogOutPin;
//% fixedInstance shim=pxt::getPin(PIN_A1)
const A1: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_A2)
const A2: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_A3)
const A3: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_A4)
const A4: PwmPin;
//% fixedInstance shim=pxt::getPin(PIN_A5)
const A5: PwmPin;

//% fixedInstance shim=pxt::getPin(PIN_D13)
const D13: DigitalInOutPin;

//% fixedInstance shim=pxt::getPin(PIN_D4)
const SDA: DigitalInOutPin;
//% fixedInstance shim=pxt::getPin(PIN_D5)
const SCL: DigitalInOutPin;

//% fixedInstance shim=pxt::getPin(PIN_D13)
const SCK: DigitalInOutPin;
//% fixedInstance shim=pxt::getPin(PIN_D12)
const MISO: DigitalInOutPin;
//% fixedInstance shim=pxt::getPin(PIN_D11)
const MOSI: DigitalInOutPin;

//% fixedInstance shim=pxt::getPin(PIN_D0)
const RX: DigitalInOutPin;
//% fixedInstance shim=pxt::getPin(PIN_D1)
const TX: DigitalInOutPin;
}

declare namespace input {
/**
* Capacitive pin D1
*/
//% block="touch D1" fixedInstance shim=pxt::getTouchButton(PIN_D1)
const touchD1: TouchButton;

/**
* Capacitive pin D3
*/
//% block="touch D3" fixedInstance shim=pxt::getTouchButton(PIN_D3)
const touchD3: TouchButton;

/**
* Capacitive pin D4
*/
//% block="touch D4" fixedInstance shim=pxt::getTouchButton(PIN_D4)
const touchD4: TouchButton;

/**
* Button connecting D0 to GND.
*/
//% block="button D0" fixedInstance
//% shim=pxt::getButtonByPin(PIN_D0,BUTTON_ACTIVE_LOW_PULL_UP)
//% parts="buttons"
const buttonD0: Button;


/**
* Button connecting D1 to GND.
*/
//% block="button D1" fixedInstance
//% shim=pxt::getButtonByPin(PIN_D1,BUTTON_ACTIVE_LOW_PULL_UP)
//% parts="buttons"
const buttonD1: Button;


/**
* Button connecting D2 to GND.
*/
//% block="button D2" fixedInstance
//% shim=pxt::getButtonByPin(PIN_D2,BUTTON_ACTIVE_LOW_PULL_UP)
//% parts="buttons"
const buttonD2: Button;


/**
* Button connecting D3 to GND.
*/
//% block="button D3" fixedInstance
//% shim=pxt::getButtonByPin(PIN_D3,BUTTON_ACTIVE_LOW_PULL_UP)
//% parts="buttons"
const buttonD3: Button;


/**
* Button connecting D4 to GND.
*/
//% block="button D4" fixedInstance
//% shim=pxt::getButtonByPin(PIN_D4,BUTTON_ACTIVE_LOW_PULL_UP)
//% parts="buttons"
const buttonD4: Button;
}


Loading