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
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 buzzernpm i https://github.com/rossdoker/bh1750Kaluma library for BH1750 light sensornpm 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 で成功した
npm i https://github.com/rossdoker/ds1307Kaluma library for DS1307 RTC modulenpm i https://github.com/niklauslee/esp8266-driverESP8266 network device driver for Kalumanpm i https://github.com/niklauslee/esp8266-http-clientA simple Kaluma HTTP client library for ESP8266 modulenpm i https://github.com/niklauslee/hc-sr04Kaluma library for HC-SR04 ultrasonic distance measurement module- i2c-lcd 成功した! npm install i2cとこのサイトのnpm installが必要だった
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)
- Kaluma library for IR (Infra-red) receiver.
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. npm i https://github.com/niklauslee/lcdKaluma library for liquid crystal display (HD44780 driver)- lm35 成功したが、手持ちのそれが怪しい
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 npm i https://github.com/niklauslee/max7219A library for MAX7219/MAX7221 (LED matrix)npm i https://github.com/alexander-daniel/mcp3008Kaluma library for MCP3008 8-Channel ADCnpm i https://github.com/niklauslee/micro-jestA tiny testing framework for Kalumanpm i https://github.com/niklauslee/mpu6050Kaluma library for MPU6050 6-axis motion sensornpm i https://github.com/niklauslee/neopixelKaluma library for NeoPixel (ws2812) based on RP2 PIO (Programmable I/O)npm i https://github.com/niklauslee/pcd8544Kaluma library for PCD8544, a.k.a Nokia 5110 (Monochrome LCD Display)npm i https://github.com/niklauslee/picosystemKaluma library for Pimoroni's PicoSystemnpm i https://github.com/niklauslee/rotary-encoderKaluma library for rotary encoder with a push switch (KY-040)npm i https://github.com/niklauslee/servoKaluma library to control servo motorsnpm 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) npm i https://github.com/niklauslee/stepperKaluma library to control stepper motorsnpm i https://github.com/niklauslee/tm1637Kaluma library for 7-segment LED Display- vl53l0x そもそも持っていない
npm i https://github.com/haraldkubota/vl53l0xTime-of-Flight Sensor VL53L0X 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上でターミナルを管理者権限で開き、以下を実行します。
