|
|
|
Junior Member
      
Group: Forum Members
Last Login: Thursday, June 25, 2009 7:25 PM
Posts: 11,
Visits: 35
|
|
| I searched the forums but didn't find anything covering this. Can you connect an led to one of the GPIO ports and turn it on or off?
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Thursday, June 25, 2009 7:25 PM
Posts: 11,
Visits: 35
|
|
| I've been playing around a bit and can't find a solution. The gnd and vcc pins of all the digital io ports always have voltage on them. Is there any way to turn power off on any of the io ports? Nobody else has ever needed a light visible outside of whatever case the serializer is in? Any ideas on how I can do this?
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Thursday, June 25, 2009 7:25 PM
Posts: 11,
Visits: 35
|
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: Friday, April 22, 2011 6:18 PM
Posts: 153,
Visits: 547
|
|
Using the setio command documented in the Serializer manual you
should be able to turn pins off and on.
Remember the pin layout is
outside row of pins is Gnd
middle row is Vcc or +5
Inside row is Signal ( the ones that change).
From Example page 24,
Example 1: Set general purpose I/O pins 1 and 2 to 1 (+5v) and
pins 6 and 8 to 0 (0v)
>setio 1:1 2:1 6:0 8:0
ACK
>
I dont recall if the pins are tied high internally or not.
I hope this helps. See product: http://www.roboticsconnection.com/p-70-push-button-io-board.aspx as it does what you want.
Don Lewis
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Thursday, June 25, 2009 7:25 PM
Posts: 11,
Visits: 35
|
|
| Thanks for the reply. I'm using the .net library, and didn't see an equivilent to the setio telnet command. Did I miss it, or is telnet the only way?
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: Friday, April 22, 2011 6:18 PM
Posts: 153,
Visits: 547
|
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Thursday, June 25, 2009 7:25 PM
Posts: 11,
Visits: 35
|
|
| I've been playing with this a bit more, but no progress. The GpioPin class just isn't working like I expect it to. I want to toggle power on or off. Do either the "enabled" or "state" properties do this? Also, am I correct in using the gnd and vcc pins for the led? Or should one of them be connected to the sig pin? Any advice would be appreciated.
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
| ccovert, Don is absolutely right about the correct code to twiddle an LED using the GPIO ports using the setio command or using the GpioPin object in the .NET lib. As for physically connecting the LED to a GPIO line, you'll want to connect it through a 10k resistor to ground. So, run a jumper from a GPIO line ('sig' pin) to an LED, then from the LED to a resitor, then from the resistor to ground. MAKE SURE you have the LED wired correctly (using Anode/Cathode), else you'll probably fry the LED. Best Regards!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|