Jump to content

I don't know if I posted this at the correct thread but Help. Arduino Yun bridge won't "put" data if I don't start the Arduino Yun?

JohnQ

Ok I don't know if my title makes sense , but here's my arduino sketch.


https://jpst.it/FsoH


If I boot up the Yun and just call arduinoyun.local/data/get I only get this


*{"value":[],"response":"get"}*


Nothing, eventhough I've coded in the Bridge.put already.


BUT once I run the serial on Arduino's software http://imgur.com/NAqIfHe  . It Gives out the reading as intended.


When I enter the arduinoyun.local/data/get THEN it will have the data that I needed.


That is:


*{"value":{"date":"Fri Feb 12 02:08:22 SGT 2016\u000a","cm":"6","inches":"2"},"response":"get"}*


I can't seem to just call the /data/get without starting the serial monitor on Arduino's. I've been stuck for days. Help? Is there a special command I need to get it to turn on without using the Arduino's Serial monitor first?

Link to comment
Share on other sites

Link to post
Share on other sites

SOLVED. Apparently just had to remove While(!Serial) on setup(){ } 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×