Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork16
JS module providing discovery of the Arduino Create Plugin and communication with it
License
arduino/arduino-create-agent-js-client
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
JS module providing discovery of theArduino Create Plugin and communication with it
npm install arduino-create-agent-js-client --save
importDaemonfrom'arduino-create-agent-js-client';constdaemon=newDaemon();daemon.agentFound.subscribe(status=>{// true / false});daemon.channelOpenStatus.subscribe(status=>{// true / false});daemon.error.subscribe(err=>{// handle err});// List available devices (serial/network)daemon.devicesList.subscribe(({serial, network})=>{constserialDevices=serial;constnetworkDevices=network;});// Open serial monitordaemon.openSerialMonitor('port-name');// Read from serial monitordaemon.serialMonitorMessages.subscribe(message=>{console.log(message);});// Write to serial monitordaemon.writeSerial('port-name','message');// Close serial monitordaemon.closeSerialMonitor('port-name');// Upload sketch on serial target (desktop agent and chrome app)daemon.uploadSerial(target,sketchName,compilationResult,verbose);// Upload sketch on network target (daesktop agent only)daemon.uploadNetwork(target,sketchName,compilationResult);// Upload progressdaemon.uploading.subscribe(upload=>{console.log(status);});// Download tooldaemon.downloadTool('toolname','toolversion''packageName','replacement');// Download statusdaemon.downloading.subscribe(download=>{console.log(download);});
Just runnpm run dev
and open your browser onhttp://localhost:8000
To enable communication between yourlocal installation and theArduino Create Agentaddorigins = http://localhost:8000
on your agent config.ini file(if you are using https, addorigins = https://localhost:8000
).
- On macOs ~/Applications/ArduinoCreateAgent-1.1/ArduinoCreateAgent.app/Contents/MacOS/config.ini
- On Linux ~/ArduinoCreateAgent-1.1/config.ini
About
JS module providing discovery of the Arduino Create Plugin and communication with it
Resources
License
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Contributors11
Uh oh!
There was an error while loading.Please reload this page.