Go Down

Topic: Arduino Yun Rest API + Node.js communication (Read 3435 times) previous topic - next topic


May 11, 2017, 06:38 pm Last Edit: May 11, 2017, 06:48 pm by nnitgd
Hi, I have a question about Yun Rest API and Node.js communicatoin
I have Yun mini(No SD card).

I uploaded Bridge example in the Yun and I success to get sensor data with
Code: [Select]

And then, I want to use this data in the localhost.
I tried with node.js to get data from arduino yun like that
Code: [Select]

var express = require('express');
var path = require('path')
var app = express();

app. get('/',function (req,res){
  res.send('Hello World!');

app.get('', function (req, res) {

In the localhost:3000, I can see 'Hello World!'
But i cannot get the sensor data..

I guess it is not correct way. How can I get data from Yun???

Go Up