Sketch/Application requests

Discussion about any of the included sketches (i.e. WebServer), or user-generated applications.

Sketch/Application requests

Postby gsxrex » Sat May 09, 2009 10:40 pm

Post here if you have a request for a sample sketch or application that you think would be a good addition to the examples included with the code.

If you need help with a sketch you are working on, then please create a separate thread in this forum. This sticky thread is mostly to collate quick sample sketches that will help people to understand a concept, and then turn around and create something awesome with it.
User avatar
gsxrex
 
Posts: 115
Joined: Thu Apr 30, 2009 9:49 am

Re: Sketch/Application requests

Postby gsxrex » Sat May 09, 2009 10:45 pm

- A sample sketch to show how to control an LED on a pin of the Arduino.

- A sample sketch to show how to periodically send data to another location.
User avatar
gsxrex
 
Posts: 115
Joined: Thu Apr 30, 2009 9:49 am

Re: Sketch/Application requests

Postby MCxPRT » Sun May 10, 2009 9:51 am

It would be great if we had some generic/customizable sketches such as:

1) Sketch that reads all Arduino analog and digital inputs, and posts their values on the WiShield webpage. A similar sketch exist for the Ethernet Shield.

2) Sketch that configures the WiShield webpage with controls (textboxes, buttons, checkboxes, radio buttons, etc.) to control variables in the sketch and actuators (piezo, DC motors, servos, LEDs, etc.) connected to the Arduino.
MCxPRT
 
Posts: 1
Joined: Sun May 10, 2009 9:31 am

Re: Sketch/Application requests

Postby unwiredben » Tue May 12, 2009 9:05 pm

If you want to port over my Webduino code to the Wifi shield, please feel free. It's all up at http://webduino.googlecode.com and under a MIT-style license. Right now, it's tied to the Ethernet Shield code -- it inherits from the Server class and uses the Client class, and it makes a lot of use of the Print class inheritance too.
unwiredben
 
Posts: 1
Joined: Tue May 12, 2009 9:03 pm

Re: Sketch/Application requests

Postby gsxrex » Thu May 14, 2009 1:11 pm

Hmmm, this could be great. The more options the better. I'll take a look and see what we can do.
User avatar
gsxrex
 
Posts: 115
Joined: Thu Apr 30, 2009 9:49 am

Re: Sketch/Application requests

Postby pwt » Tue May 26, 2009 5:20 pm

Any sort of client sketch would be nice. I guess I can take a look at the Ethernet examples and try to do something.

I would like to send web requests on each loop or something to that effect...
pwt
 
Posts: 1
Joined: Tue May 26, 2009 5:19 pm

Re: Sketch/Application requests

Postby MOS6502 » Wed Jun 24, 2009 12:41 pm

I would really like to see a simple sketch to read and parse data from a web page - for example - reading current weather and temp from weather.com or similar.
MOS6502
 
Posts: 4
Joined: Fri May 15, 2009 11:42 am

Re: Sketch/Application requests

Postby gsxrex » Fri Jun 26, 2009 12:20 am

@MOS6502

The new WiServer we just dropped has a sample client sketch that gets weather data from the NWS. Currently it just spits it out to the serial output, but it could be modified to be parsed.
User avatar
gsxrex
 
Posts: 115
Joined: Thu Apr 30, 2009 9:49 am

Re: Sketch/Application requests

Postby booboobooboo » Sat Jul 18, 2009 2:57 am

Hi All,
I received my WiShield on thursday and overall im pleased. But..
as a n00b the WiShield has got me so confused as most of the work is being done outside of the sketch, by that i mean in "Loop" we juts have Wifi.run(). Now call me dumb, but ive had to retrace through all the header files and includes to find out what the heck is going on before i even try and do soem simple blinky type stuf, and im totally lost.

Could i suggest we try and simplify/create some functions that n00bs can use straight from the sketch and not delve into the includes? the WiServer.print seems a step in right direction.

could we have some functions like...

WiServer.btnClicked(str) //Returns the id / name of button pressed on page
WiServer.txtInput(id,str) // Returns the text inputted into a text box of id=id
WiServer.readVar(var) //Gets a variable from the url i.e. http://192.168.1.1/index.html?var1=stri ... r2=string2
WiServer.Signal(int) // Dunno if signal strength is available but would be killer if we could fetch it somehow.


Also when playing with the example skethces i got so sick of entering my WPA details, i cut and pasted the connection init from sketch into a new file MyConfig.h and the just used #include <MyConfig.h> , that way i can jump into any sketch and get my conection details. What would be mega ace would be a way of inititate and killing a connection quickly (save battery life on mobile projects) such as

WiServer.Connect(MyConfigs)
WiServer.Disconnect()
and a IsConnected would be great, because i dont know about you but my sketches dont run until the WiFi connects.

I know i know, some things above will not be possible, but i just hope you guys can see like me, this shield could really benefit tinkerers out there, not just the code heads.

BTW, i want to use the WiShield to make a wireless tea making machine. ;)
booboobooboo
 
Posts: 2
Joined: Sat Jul 18, 2009 2:34 am

Re: Sketch/Application requests

Postby comperem » Sat Jul 18, 2009 6:26 pm

I agree 100% with booboobooboo's post above.

The content generated in the examples mostly occurs right inside the sending functions which are nested about 9 functions deep from the Arduino sketch. The method and function trail goes straight through the complex tcp/ip stack management code. Impressive as that code is, I cannot seem to figure out how to plumb a simple counter in loop() through to the handle_connections() function. :shock: :?

The sending functions such as PSOCK_SEND(), PSOCK_SEND_STR(), and PSOCK_GENERATOR_SEND() are all great - beautiful - but do not have scope to be used in loop() inside the top-level Arduino sketch. Also the receiving or reading macros PSOCK_READBUF(), PSOCK_READTO(), PSOCK_DATALEN(), and PSOCK_NEWDATA() are all awesome. But again, unusable outside the depths of the class definition and C externs.

I'm pretty sure this is easy stuff for the AsyncLab coding guys but I've spent the better part of a Saturday and have understood their code but made no headway. Even made some basic modifications but was still about 4 plumbing steps away from usefulness.

Could we get the PSOCK_* macros available within the Arduino sketch setup() and loop() functions to facilitate data generation within loop()?

Or if that is not easy, perhaps two simple char buffers plumbed down into and back out of handle_connections() from loop()? Say, perhaps char outBound[100] and char inBound[100] as means of memcpy'ing data both ways between loop() and handle_connections()? The class usage in loop() makes me suspect there is very clean way of doing this... but I am at a loss.

Great work guys, it's coming along nicely (just saw UDPapp),
Marc
comperem
 
Posts: 12
Joined: Mon Jul 13, 2009 6:34 am

Next

Return to Sketches and Applications

Who is online

Users browsing this forum: No registered users and 2 guests

cron