Pages: [1]   Go Down
Author Topic: Html5 and Arduino  (Read 1294 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone,
I am doing a project that use the ipad to control a SONY VCR by Arduino and Wlan-Shield( made by Redfly), now i have done the communication between browser and Arduino,and i build a webservice at arduino.
now i want to make the webservice beautful and can be accessed by different devices,so i use HTML5 to write the code,it looks great but the css can only be used when arduino and the devices both mit have internet access,otherweise the web page looks unbelieveable terriable.

The way i build the webservice is that when a browser access to the ip-address(for example 192.168.1.110), arduino will send the socket-paket( html5 code) to the browser.

I want to ask if there is any possible to save the css and jquery files direkt in arduino or there is another way to solve the problem?


thanks
Nan
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to ask if there is any possible to save the css and jquery files direkt in arduino or there is another way to solve the problem?
The Arduino is a simple 8-bit microcontroller with only 2K of RAM.  It is not the best solution for a full blown webserver.

You probably want an embedded single-board computer like the raspberry pi or beaglebone for a project like this, not an Arduino.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

BHZ, MG, Brazil
Offline Offline
Sr. Member
****
Karma: 10
Posts: 346
Android developer; Arduino enthusiast
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to ask if there is any possible to save the css and jquery files direkt in arduino or there is another way to solve the problem?

I strongly advise you against using the Arduino for storing the CSS and HTML data.

Instead, use a SD card reader. If you are going to buy an ethernet shield, get the model that has a SD card reader on it, so you can also use that for storing the HTML and CSS files.

So, all the Arduino will do is read the HTML or CSS files from the SD card and send them through the ethernet port.
Logged

Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's smartest to serve jQuery from a content distribution network so your little arduino doesn't have to serve it.  Search for "jquery cdn".

Likewise, if your CSS is large, you can serve it from the web somewhere.  If it's small, include it inline with the HTML in your server code.

I'd get it working as one big HTML file first, then code it into your arduino server.

-br
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to ask if there is any possible to save the css and jquery files direkt in arduino or there is another way to solve the problem?

I strongly advise you against using the Arduino for storing the CSS and HTML data.

Instead, use a SD card reader. If you are going to buy an ethernet shield, get the model that has a SD card reader on it, so you can also use that for storing the HTML and CSS files.

So, all the Arduino will do is read the HTML or CSS files from the SD card and send them through the ethernet port.


thanks for your reply
y, it seems that its a not good choice to do like this,another SD card is a good idea,but it makes complex,anyway, thanks for ur advise ^^
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to ask if there is any possible to save the css and jquery files direkt in arduino or there is another way to solve the problem?
The Arduino is a simple 8-bit microcontroller with only 2K of RAM.  It is not the best solution for a full blown webserver.

You probably want an embedded single-board computer like the raspberry pi or beaglebone for a project like this, not an Arduino.

thank you for your reply,the project works with arduino, i can only use arduino to realieze ,i have been looking for the way to "build a HTML5 webservices with arduino at local area network" but it seems no one had ever done this ,i'll try another to solve this problem.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's smartest to serve jQuery from a content distribution network so your little arduino doesn't have to serve it.  Search for "jquery cdn".

Likewise, if your CSS is large, you can serve it from the web somewhere.  If it's small, include it inline with the HTML in your server code.

I'd get it working as one big HTML file first, then code it into your arduino server.

-br


thanks for ur reply , i know what your mean ,it could work perfect with internet access,but i'd like to let it perfect work without internet access,i think i have to give up HTML5 and instead use Native App to control it

Logged

Pages: [1]   Go Up
Jump to: