kaluma ide on chromeではconnectでピコとつないで左画面のコードがflashで書き込まれた! third-party packageは組み込み不可だった
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
uartはビルトインパッケージだった
const { UART } = require('uart');
const serial0 = new UART(0, { baudrate: 9600});
setInterval(() => {
console.log("1秒経過");
serial0.write('Hello, world\r\n');
}, 1000);
// serial0.close(); ATからみで必要かも。。。。
// teratermで成功 kaluma shellで一秒経過が1秒ごとに表示繰り返しあった
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
Total: 34 packages
- 7-segment うーん 配線めんど。。。
npm i https://github.com/niklauslee/7-segmentKaluma library for multi-digit 7-segment display (aka. FND - flexible numeric display) npm i https://github.com/niklauslee/active-buzzerKaluma library to generate beep sound with active buzzer- bh1750 がんばろう(発注まだ。。。)
npm i https://github.com/rossdoker/bh1750Kaluma library for BH1750 light sensor(I2C) - buzzer-music OK
npm i https://github.com/niklauslee/buzzer-musicKaluma library to play music with passive buzzer. npm i https://github.com/niklauslee/dhtKaluma library for DHT humidity and temperature sensor 成功した!- github installしてreadmeの例文をindex.jsにしてkaluma flash ./index.js --bundleして
- kaluma shell & .load で成功した
- ds1307 OK
npm i https://github.com/rossdoker/ds1307Kaluma library for DS1307 RTC module - esp8266-driver ぼちぼち
npm i https://github.com/niklauslee/esp8266-driverESP8266 network device driver for Kaluma - esp8266-http-client これがあるから上記はいらんな
npm i https://github.com/niklauslee/esp8266-http-clientA simple Kaluma HTTP client library for ESP8266 module - hc-sr04 OK
npm i https://github.com/niklauslee/hc-sr04Kaluma library for HC-SR04 ultrasonic distance measurement module - i2c-lcd 成功 npm install i2cとこのnpm installが必要だった!i2c-builtinの筈だが。。
npm i https://github.com/slashinfty/i2c-lcdKaluma library for liquid crystal display with PCF8574 I2C port expander (LCM1602 module) - const LCD = require('i2c-lcd');const lcd = new LCD();lcd.begin();lcd.clear();//lcd.cursor();//lcd.blink();lcd.home();lcd.print('hello world');lcd.setCursor(0,1); // 2行目lcd.print('from fseigojp');lcd.setCursor(0,2); // 3行目lcd.print('at kagawa prefecture');lcd.setCursor(0,3); // 4行目lcd.print('in japan');lcd.display(); // これが必須であった!
- 別の例c
- onst LCD = require('i2c-lcd');
- const lcd = new LCD();
- let count = 0;lcd.begin();setInterval(()=>{lcd.clear();lcd.home();count++;lcd.print(count);lcd.display();},1000)
- ir-receiver がんばろう
- Kaluma library for IR (Infra-red) receiver.
- joystick OK
npm i https://github.com/niklauslee/joystickKaluma library for joystick module - kaluma-eink もっていない
npm i https://gitlab.com/kobaj/kaluma-einkA library for controlling e-ink and e-paper displays (mostly from Waveshare) with Kaluma and an RP2040. - lcd うーん、配線めんど。。。
npm i https://github.com/niklauslee/lcdKaluma library for liquid crystal display (HD44780 driver) - lm35 OK
npm i https://github.com/niklauslee/lm35Kaluma library for LM35 temperature sensor - lp50xx もっていない
npm i https://github.com/AlexK-99/lp50xxThis is an Kaluma library for interaction with the LP5009 and LP5012 constant current RGB driver from Texas Instrument - max7219 OK
npm i https://github.com/niklauslee/max7219A library for MAX7219/MAX7221 (LED matrix) - mcp3008 OK
npm i https://github.com/alexander-daniel/mcp3008Kaluma library for MCP3008 8-Channel ADC - micro-jest ぼちぼち
npm i https://github.com/niklauslee/micro-jestA tiny testing framework for Kaluma - mpu6050 がんばろう
npm i https://github.com/niklauslee/mpu6050Kaluma library for MPU6050 6-axis motion sensor - neopixel OK
npm i https://github.com/niklauslee/neopixelKaluma library for NeoPixel (ws2812) based on RP2 PIO (Programmable I/O) - pcd8544 もっていない
npm i https://github.com/niklauslee/pcd8544Kaluma library for PCD8544, a.k.a Nokia 5110 (Monochrome LCD Display) - picosystem もっていない
npm i https://github.com/niklauslee/picosystemKaluma library for Pimoroni's PicoSystem - rotary-encoder もっていない
npm i https://github.com/niklauslee/rotary-encoderKaluma library for rotary encoder with a push switch (KY-040) - servo OK
npm i https://github.com/niklauslee/servoKaluma library to control servo motors - simple-fonts OK
npm i https://github.com/niklauslee/simple-fontsSimple bitmap fonts for Kaluma :: モノクロOLEDでトライ! - ssd1306 まずはこれでトライ
npm i https://github.com/niklauslee/ssd1306Kaluma library for SSD1306 (Monochrome OLED Display) - ssd1351 つぎにこれをトライ(発注した)
npm i https://github.com/niklauslee/ssd1351Kaluma library for SSD1351 (16-bit Color OLED Display) - st7735 もっていない
npm i https://github.com/niklauslee/st7735Kaluma library for ST7735 (Color TFT LCD Display) - st7789 もっていない
npm i https://github.com/niklauslee/st7789Kaluma library for ST7789 (Color TFT/IPS LCD Display) - stepper がんばろう
npm i https://github.com/niklauslee/stepperKaluma library to control stepper motors - tm1637 OK
npm i https://github.com/niklauslee/tm1637Kaluma library for 7-segment LED Display - vl53l0x もっていない
npm i https://github.com/haraldkubota/vl53l0xTime-of-Flight Sensor VL53L0X - picomqtt picowで一回は成功している。。。。
npm i https://github.com/pankleks/picomqttMQTT
WSL2をWindowsと同一LAN(ネットワーク)で通信させるには、Windows 11(22H2以降)の「ネットワークミラーモード」が最も簡単で推奨されます。
.wslconfigファイルで設定し、WSL2がホストPCと同じIPアドレスを使用できるようにすることで、LAN内の別端末から直接接続可能になります。設定方法と詳細:
- 推奨:ネットワークミラーモード (Windows 11 22H2以降)
- ユーザーフォルダ(
C:\Users\用户名)に.wslconfigファイルを作成または編集し、以下を記述してWSLを再起動(wsl --shutdown)します。 - この設定により、WSL2のLinuxディストリビューションが、Windowsホストと同一のIPアドレスを共有し、LAN内からポートが直接見えるようになります。
- ユーザーフォルダ(
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
WSL2(Windows Subsystem for Linux 2)環境でKalumaJS(カルマJS)を動作させるための一般的な手順と注意点を解説します。KalumaJSは、Raspberry Pi Picoなどのマイコンボード向けに設計されたJavaScriptランタイムです。
WSL2でKalumaJSをセットアップする手順
- Node.jsのインストール (WSL2)
KalumaJSはnpmを使用してインストールします。まず、UbuntuなどのWSL2ディストリビューションにNode.jsをインストールします。 - Kaluma CLIのインストール
npm経由でKaluma CLIをグローバルにインストールします。 - USBシリアルポートの権限設定 (重要)
WSL2はデフォルトでUSBデバイスに直接アクセスできません。Windows側のUSBシリアルポート(Pico)をWSL2に渡す必要があります。- USBIPD-WIN のインストール (Windows側): Windows上でターミナルを管理者権限で開き、以下を実行します。
- Picoのバインド: USBでPicoを接続し、Windows側でポート番号を確認してバインドします。
- USBIPD-WIN のインストール (Windows側): Windows上でターミナルを管理者権限で開き、以下を実行します。

0 件のコメント:
コメントを投稿