Skip to content

Commit

Permalink
super tiny board
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Sep 29, 2023
1 parent de4699c commit ad6cd97
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
35 changes: 35 additions & 0 deletions packages/sampleprj/boards/super_mini_esp32c3.board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"archId": "esp32c3",
"devName": "ESP32-C3 SuperMini",
"productId": "0x31606c1c",
"$description": "A super tiny ESP32-C3 board.",
"url": "https://banggood.com/ESP32-C3-Development-Board-ESP32-SuperMini-WiFi-Bluetooth-Mini-Module-p-1997449.html",
"$services": [
{
"name": "buttonBOOT",
"pin": 9,
"service": "button"
}
],
"i2c": {
"pinSCL": 7,
"pinSDA": 6
},
"led": {
"pin": 8,
"isMono": true
},
"log": {
"pinTX": 21
},
"pins": {
"P0": 0,
"P1": 1,
"P2": 2,
"P3": 3,
"P4": 4,
"P5": 5,
"P10": 10,
"P20": 20
}
}
12 changes: 12 additions & 0 deletions packages/sampleprj/src/mainsupertiny.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { pins, board } from "@dsboard/super_mini_esp32c3"
import { setStatusLight } from "@devicescript/runtime"
import { delay, millis } from "@devicescript/core"

setInterval(async () => {
await setStatusLight(0)
console.log(`${millis()}: off`)
await delay(1000)
await setStatusLight(0xff0000)
console.log(`${millis()}: on`)
await delay(1000)
}, 1)

0 comments on commit ad6cd97

Please sign in to comment.