Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 15
61  Forum 2005-2010 (read only) / Troubleshooting / Re: Writing to Arduino serial with PHP problem on: October 04, 2010, 06:11:13 pm
To avoid the repeated serial connection problem you could use a serial proxy as an intermediary between your PHP code and the serial port. I've done this many times with ser2net on Linux: most scripting languages have cruddy support for serial comms, but are fantastic at handling network connections. Ser2net takes a serial port and exposes it as a network socket, then in your PHP you can just open a network connection to that port and send / receive data.

Ser2net is great if you're using Linux, and for Mac and Windows there's an equivalent called serproxy. You can download it from the bottom of the Arduino software download page:

http://www.arduino.cc/en/Main/Software
--
Jon
62  Forum 2005-2010 (read only) / Troubleshooting / Re: Writing to Arduino serial with PHP problem on: October 04, 2010, 07:35:26 am
Another thing to try is the old "divide and conquer" approach to debugging. Cut the system in half and see which half has the problem by first eliminating the PHP section: use the serial monitor in the IDE instead and send the values directly by typing them in.
--
Jon
Practical Arduino: www.practicalarduino.com
63  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield, to control Arduino, using RFID on: September 08, 2010, 08:53:49 pm
Quote
i have ordered one of your ethernet boards! it looks brilliant!

Cool, thanks! I saw that order this morning and it's been shipped already. Hopefully it won't take too long to reach all the way around the other side of the world.
--
Jon
64  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield, to control Arduino, using RFID on: September 07, 2010, 07:43:00 am
I originally bought the ENC28J60-based board because it was cheap, and it was only after I started using it that I discovered how rubbish the drivers are. It exposes way too much stuff inside the sketch rather than keeping it nicely encapsulated in the library. I bought other ENC28J60 shields from Seeed Studio because it had the prototyping area on it, which was a brilliant idea. It was because that was so useful that I ended up putting so much proto area on the Freetronics Ethernet shield (www.freetronics.com/ethernet-shield). But the ENC28J60 chipset is just awful to work with.

The Wiznet W5100 chipset is the one used in the official Arduino Ethernet shield so it's supported by the IDE right out of the box. That's why we settled on the W5100 for our shield. So in the end I got the best of both worlds: the prototyping area that I liked so much on the Seeed shield, but combined with the W5100 that's supported by the official library.

As the story goes: if you want something done the way you want it, best to do it yourself! The Freetronics Ethernet shield really was designed on the basis of what I personally wanted, and if other people find that useful, great. If not, there are plenty of other variants out there that cater to different needs.
--
Jon
Practical Arduino: www.practicalarduino.com
65  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield, to control Arduino, using RFID on: September 07, 2010, 02:16:59 am
Sure, that's not a problem at all. I've done 2 projects that use similar technologies and it's not too hard. The first one was a light switch that has an Arduino and an Ethernet shield behind it, and it uses web services to send commands to my home automation controller which in turn controls devices:

http://jon.oxer.com.au/blog/id/307

I've also used an RFID reader in a very similar way to what you're describing, except I use it to read a chip implanted in my arm and (once again) communicate with my home automation controller via web services which then unlocks a door. You can see it in use in the video on this site:

www.superhouse.tv

There's also some RFID stuff in Practical Arduino that may help you along:

http://www.practicalarduino.com/projects/rfid-access-control-system
--
Jon
Ethernet Shield with PoE support: www.freetronics.com/ethernet-shield
66  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield connectivity on: August 26, 2010, 01:45:47 am
I'm not really sure if you're referring to your own computer or your Arduino here, but I'll assume it's the Arduino:

Quote
Same, I can't telnet to it or ping it.

I wouldn't expect you'd be able to if it has the webserver sketch loaded. Larger computers with more complete networking stacks can listen for incoming connections on multiple ports and then farm those connections off to the appropriate handler, such as a telnet daemon, or handle them internally, such as responding to ICMP ECHO requests (pings). A little Arduino doesn't have the software stack to do that. When you're running the webserver sketch, it'll only ever respond to properly-formed requests on the port you've configured for it to listen on (typically port 80), and anything else will fall into a black hole. The Arduino will never even hear it, because the software isn't there to listen for those connections.

If you want to have it respond to pings so that you can test connectivity to it, you'll need to specifically load a sketch that responds to pings.
--
Jon
67  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino secondary power supply? on: July 23, 2010, 07:59:19 am
Quote
A circuit to generate a interrupt on loss of PC Vcc

That's what I did for the Vehicle Telemetry Project in Practical Arduino. There's a big cap on the input side of the voltage reg, being fed via a diode. A voltage divider on the input side of the diode is connected to an interrupt on the Arduino with a Zener diode as a voltage clamp. The Arduino therefore knows right away if the power supply goes away, and the diode prevents the cap from holding the voltage divider high. In that particular project the ISR triggers an emergency shutdown that closes a logfile being written to a USB memory stick so it's not corrupted when the Arduino loses power a few milliseconds later.

Jon
--
Practical Arduino: www.practicalarduino.com
Freetronics: www.freetronics.com
68  Forum 2005-2010 (read only) / Troubleshooting / Re: breathalizer on: July 28, 2010, 11:11:38 pm
Could you please provide a product code or URL for the specific sensor you have? You won't get much help unless you can identify the sensor.
--
Jon
Freetronics: www.freetronics.com
Practical Arduino: www.practicalarduino.com
69  Forum 2005-2010 (read only) / Troubleshooting / Re: Flow sensor on: August 04, 2010, 06:09:32 pm
The discussion so far has been about code, and we've just been assuming that the hardware is OK. How do you have the sensor connected? Can you test it in isolation from the Arduino, such as by connecting an oscilloscope to the output? A schematic of your setup would be handy: even a photo of a rough hand-drawn schematic is better than nothing.
--
Jon
Practical Arduino: www.practicalarduino.com
70  Forum 2005-2010 (read only) / Troubleshooting / Re: Flow sensor on: August 03, 2010, 08:28:04 pm
Also, there may be some useful information in the Water Flow Gauge project in Practical Arduino:

http://www.practicalarduino.com/projects/water-flow-gauge

That one uses an interrupt to detect the pulses.
--
Jon
Freetronics: www.freetronics.com
71  Forum 2005-2010 (read only) / Troubleshooting / Re: duemilanove, ethernet shield and logging shield on: July 27, 2010, 11:07:02 pm
Quote
can i power the duemilanove via a 12v psu AND still use the usb to the computer

Yes, the Duemilanove has auto-switching on the power source so you can have them both plugged in at once. There are two operational modes: power supplied via the 2.1mm jack (which feeds through the on-board voltage regulator); and power supplied via the USB connection.

The auto-switching circuit favors the external power connection so if there is >6V available via the 2.1mm jack it will isolate the 5V line on the USB port and use the on-board regulator instead.

USB and the onboard regulator can both supply approximately the same amount of current though, so I don't think that will solve your problem if it really is a lack of power. I suspect the problem may be something else, most likely the boards fighting over SPI.
--
Jon
Freetronics: www.freetronics.com
Practical Arduino: www.practicalarduino.com
72  Forum 2005-2010 (read only) / Development / Re: Shield pin usage list on: December 11, 2010, 03:03:56 am
Quote
IF a shield uses I2C, please list the ADDRESS or ADDRESS Range usable.

For things like that I list it in the "notes" section that appears directly below the shield diagram, but only if I know what it is. I've spent many, many hours going through circuit diagrams and documentation for shields trying to find info like that but I can't do it all myself! If you have information about any particular shields please click the link at the bottom of the page to send me a correction.

Quote
Also how might one develop a spi shield and give a few choices for CS/SS pins?

That's entirely up to you. The easiest is probably to run something like a 2x3 male header, with all pins on one side connected to the chip CS and the other three pins connected to three digital lines. Then users can put a little 2-way jumper header in place to select which digital line to use.
--
Jon
Security Sensor Shield: www.freetronics.com/secsense
73  Forum 2005-2010 (read only) / Development / Re: Shield pin usage list on: December 10, 2010, 08:21:43 am
That's right, I'd forgotten I was going to do that. I'll do a bit of a cleanup and put it on GitHub.

I wouldn't take it as an example of a great way to do it though!
--
Jon
74  Forum 2005-2010 (read only) / Development / Re: Shield pin usage list on: November 04, 2010, 08:22:52 pm
Quote
I'd say we need the SPI header

I assume you mean the ICSP header? I planned for that right from the start and the fields are included in the DB, but when I was putting together the form with the pins represented by checkboxes it was late at night and I couldn't be bothered adding them in. I planned to get back to it, but I just haven't yet  :-(

By the way, there's now a parcel heading your way. It will probably take a week or so to the UK though.
--
Jon
75  Forum 2005-2010 (read only) / Development / Re: Shield pin usage list on: November 03, 2010, 05:38:12 pm
Quote
You should make sure you have a way to handle optional pin usage.

That would be nice, but I haven't figured out a nice way to handle it. It would add a lot of complexity to the user interface (both current and intended) for the site because there are so many possible scenarios.

It's not as simple as adding a third pin option so they can be flagged as "used", "not used", or "optional". Often the options are tied together, so a shield may use one combination of pins in one mode and another combination of pins in another mode. A good example of this is the Spikenzie Labs Button 64 Shield (http://shieldlist.org/spikenzie/b64) because it can use either:
 
 D0

OR

 D2, D3, and D4

but not both groups at the same time.

So if I just marked D0, D2, D3, and D4 as "optional" it would be technically correct, but just as misleading as marking them as all used. People might think they could use any one of them or even none of them when that's not the case. D2-4 would really need to be bound together into a group, and D0 defined as another group, and those groups be defined as mutually exclusive but with one or the other required. But how would that be represented visually?

Mutually-exclusive-but-required groups is one scenario. Then there are others such as optional pins that are required by some features that may not be used by others such as the SD card slot on the new Ethernet shield that may not be used by many people (http://shieldlist.org/arduino/ethernet-v5). Or shields that are nothing but breakouts, so they could use *all* the pins or *none* of them, depending on what else is attached (http://shieldlist.org/seeedstudio/brick-chassis).

Showing optional pin usage sounds good in theory, but when you try to figure out how to actually store / represent that information it suddenly becomes a surprisingly difficult problem!

For now I'm handling it by marking the "default" or basic pin use in the DB, and adding a text note about alternative assignments. At least having all this info in text form in one place is a huge improvement on how things were a month ago.
--
Jon
Freetronics: www.freetronics.com
Pages: 1 ... 3 4 [5] 6 7 ... 15