FirmateWebClient: a simple way to access sensors&actuators

A place to talk about all the Operating Systems, Software & Hardware
Forum rules

- Posts are to be made in the relevant forum. Users are asked to read the forum descriptions before posting.

- Members should post in a way which is consistent with "normal writing". That is users should not post excessive numbers of emoticons, large, small or coloured text, etc. Similarly users should not SHOUT or use excessive punctuation (e.g. ! and ?) in topic titles or posts.

- Members should use an appropriate, descriptive subject when posting a new topic. Examples of bad subjects include; "Help me!", "I'm stuck!", "I've got an error!", etc. Examples of good subjects include; "Getting an TABLE FULL error upon login", "Cannot restore a backup".

- Members are asked to post in English only so that posts can be well received and properly monitored.

- Spam is not tolerated here under any circumstance. This includes offering hosting services (charged and free), installation services, solicitation etc. Recruiting members for your own projects (moderators, designers, professional MOD work, etc.) is not permitted and is also considered spam. Users posting spam will be warned and their post removed.

- Members should post in a way that is respectful of other users. Flaming or abusing users in any way will not be tolerated and will lead to a warning. Vulgar language and inappropriate material is not allowed and will be removed. We try to maintain a family friendly atmosphere whenever it is possible within the main subject matter of this community. Please keep this in mind when participating.

- Each user is allowed to create one account. If you would like to change your username, please contact us and, most likely, we can do it for you while you can keep all of your profile data, posts, and other content.

- If a user violates our guidelines and shows a disregard for them, our staff and our community, they run the risk of losing their account. We reserve the right to deactivate any account and to edit or remove any content without warning. These guidelines are subject to change at any time without notice.

Thank you for visiting LattePanda.com!
Post Reply
User avatar
LattePanda
Site Admin
Posts: 1517
Joined: Wed Jan 20, 2016 9:09 am

Thu Dec 15, 2016 8:04 am

FirmateWebClient provides a minimum HTTP-based firmata controller for various hardware, typically Arduino. This extends user's control and monitoring of the hardware using platform-independant URL requests.
Click here to see more information. https://github.com/LattePandaTeam/Latte ... troduction

Support list:
1. Digital Pins
2. Analog Pins
3. PWM
4. Servo
This is just a few of the many possibilities. We welcome you build, extend and experiment with the features you need.

Here is all the code you need to build a NodeJS project and turn on an LED, you can see all the examples in /examples folder.

Code: Select all

var http = require('http');
var querystring = require('querystring');
var url = {
    hostname: '192.168.2.37',//device ip
        port: 23456,
        path: '/read_all_pins',//read all pins
      method: 'GET'
};
//send get request
var req = http.request(url,function(res){
    res.setEncoding('utf8');
    res.on('data',function(chunk){
        var returnData = JSON.parse(chunk);
        console.log('D9 state: %s',returnData.data['9']);
    });
});
req.on('error', function(e){
     console.log('error' + e.message);
});
req.end();
Look forward to any suggestions and feedback!
We are the fans of LattePanda ! :lol:

User avatar
ED209
Posts: 166
Joined: Tue Apr 19, 2016 3:31 pm

Fri Dec 16, 2016 7:07 am

This looks interesting. Is there anyone can help to write a sample based on Java or csharp?
I'm not good at programming. :D

Post Reply