Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ daemon.error.subscribe(err => {
});

// List available devices (serial/network)
daemon.devicesList.subscribe(devices => {
const serialDevices = devices.serial;
const networkDevices = devices.network;
daemon.devicesList.subscribe(({serial, network}) => {
const serialDevices = serial;
const networkDevices = network;
});

// Open serial monitor
Expand Down Expand Up @@ -65,6 +65,9 @@ daemon.downloading.subscribe(download => {
});

```
## Configure device for Arduino IoT
Call functions in [board-configuration.js](https://github.com/arduino/arduino-create-agent-js-client/blob/master/src/board-configuration.js)

## Development and test features
Just run `npm run dev` and open your browser on http://localhost:8000

Expand Down
6 changes: 3 additions & 3 deletions test/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ class App extends React.Component {

daemon.error.subscribe(this.showError);

daemon.devicesList.subscribe(devices => this.setState({
serialDevices: devices.serial,
networkDevices: devices.network
daemon.devicesList.subscribe(({ serial, network }) => this.setState({
serialDevices: serial,
networkDevices: network
}));

daemon.supportedBoards.subscribe(boards => this.setState({
Expand Down