Skip to content

Commit

Permalink
updated samples and servers
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Oct 9, 2023
1 parent 1766275 commit c1e1d5a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
15 changes: 9 additions & 6 deletions packages/sampleprj/src/maingrovelcd16x2.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import "@dsboard/seeed_xiao_esp32c3"
import * as ds from "@devicescript/core"
import { XiaoExpansionBoard, startGroveRGBLCD16x2 } from "@devicescript/drivers"
import {
XiaoGroveShield,
startGroveRGBLCD16x2,
startBME680,
} from "@devicescript/drivers"

const board = new XiaoExpansionBoard()
const board = new XiaoGroveShield()

console.log("start...")
const { temperature } = await startBME680()
const lcd = await startGroveRGBLCD16x2()
setInterval(async () => {
const t = ds.millis() + ""
console.log(t)
await lcd.message.write(t)
const temp = Math.round(await temperature.reading.read())
await lcd.message.write(`temp: ${temp}C`)
}, 1000)
11 changes: 10 additions & 1 deletion vscode/src/server-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,22 @@
},
{
"label": "Seeed Studio XIAO Expansion Board",
"detail": "Drivers for the {@link https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/ | Seeed Studio XIAO Expansion Board } for Raspberry Pi Pico.\r",
"detail": "Drivers for the {@link https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/ | Seeed Studio XIAO Expansion Board }.\r",
"startName": "XiaoExpansionBoard",
"imports": {
"XiaoExpansionBoard": "@devicescript/drivers"
},
"snippet": "const shield = new XiaoExpansionBoard()\n"
},
{
"label": "Grove Shield for Seeed Studio XIAO",
"detail": "Drivers for the {@link https://www.seeedstudio.com/Grove-Shield-for-Seeeduino-XIAO-p-4621.html | Grove Shield for Seeed Studio XIAO } for Raspberry Pi Pico.\r",
"startName": "XiaoGroveShield",
"imports": {
"XiaoGroveShield": "@devicescript/drivers"
},
"snippet": "const shield = new XiaoGroveShield()\n"
},
{
"label": "WaveShare Pico LCD114 for Raspberry Pi Pico",
"detail": "Driver for WaveShare Pico-LCD-1.14 inch.\r",
Expand Down

0 comments on commit c1e1d5a

Please sign in to comment.