Shop OBEX P1 Docs P2 Docs Learn Events
question on reading variables and visualizing them — Parallax Forums

question on reading variables and visualizing them

stefstef Posts: 173
edited 2011-08-15 16:45 in Accessories
Hi

Ik hope somebody can help me. (perhaps Mike G is interested)
I wend over the examples he is showing on his spinneret.servebeer.com. I tried everyting out and it works. I have to say i'm not good in web and http but with his examples it is working. I'm learning and I'm interested in doing more on the spinneret.
The only thing I find using his multi socket web server is examples of stearing outputs (for example his LED example). That is working ok.
I can't find anything on reading imputs and / or variables. Has sombody an example for me with a bit of explanation like on servebeer.com but then for reading an input and visualize them on a web page. Also an variable is wanted. I'm trying to create a temprature controle that is reading the temprature and is visualizing it on the web page of the spinneret. The temprature reading is no problem. I already have that. I have stored the different values of the temp in variables. I can show them on the serial terminal. What I can't figure out is how you get that in the web page you place on the SD card of the spinneret. I want to show them in the web page.
Any help is welcome as I want to learn more.

Stef

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-08-15 12:55
    stef;

    Did you look at the Returning XML Page?

    It shows how to read the current time from the Real Time Clock using I2C, formatting the time, and displaying the time on a web page using JavaScript and the DOM (Document Object Model).
  • stefstef Posts: 173
    edited 2011-08-15 13:00
    Hi Mike.

    Thanks for your fast answer. Did you add that to the servebeer.com. When I looked at it some pages where not available. Now I see that they are. I will start on it to test and run them on my spinneret.

    Thanks for your help. As I said I'm not so good in http but I will try and learn.

    Stef
  • stefstef Posts: 173
    edited 2011-08-15 13:07
    Hi Mike

    Just a fast question I forgot in previus post.

    I tryed your example of email for sending an email. It was working without a problem. Now. Do you think it is possible to program an spinneret that he is acting like an email server and when he get's an email (with fixed structure) he would reakt on it. I have created in the past with a propeller something alike but then with SMS. Whet it recieved the sms (with pin code protected) it could drive an output. I was wondering if I could create something simular but then with email, but then you neet not an email client but an email server to recieve emails.

    Can that be done on a spinneret?

    Stef
  • Mike GMike G Posts: 2,702
    edited 2011-08-15 16:45
    I'm no expert but I believe you need a way to route email traffic to your Spinneret. That's usually the work of domain MX records. Of course, you would have to code an email server too. If you have access to the email server I believe you could create filters and execute custom logic. Kinda' depends on the platform.

    It would be much easier to subscribe to a service like http://www.twilio.com/api/. Twilio allows you to run custom logic when an SMS message is received.
Sign In or Register to comment.