|
|
|
Junior Member
      
Group: Forum Members
Last Login: Saturday, May 10, 2008 2:44 AM
Posts: 13,
Visits: 22
|
|
| Hi I´m new with the serializer and I have some questions. I can connect my serializer board over Bluetooth with my computer. The Ports for the two Motors, and the LEDs can I controll. But how can I make a I/O Pin to an Input or Output. I will connect a Button who stops all Motors when I press. Can someone plese tell me how the Programm in C# looks like? thanks for your help
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Saturday, May 10, 2008 2:44 AM
Posts: 13,
Visits: 22
|
|
| Hello again I try now the holy day to get an Input to one of the Digital I/O ports. I find an example, but the serializer don´t react! Can someone tell me what I must do to get an Input Signal to the serializer and how the Programm in c# looks like? In the moment I use following programm: using RoboticsConnection.Serializer; using RoboticsConnection.Serializer.Ids; using RoboticsConnection.Serializer.Sensors; using RoboticsConnection.Serializer.Components; using RoboticsConnection.Serializer.Controllers; using System; namespace test { class Program { static Serializer _s; static GpioPin pin1; static void Main(string[] args) { _s = new Serializer(); _s.PortName = "COM40"; _s.BaudRate = 19200; _s.StartCommunication(); pin1 = new GpioPin(_s); pin1.Pin = GpioPinId.Pin1; pin1.Set += new SerializerComponentEventHandler(pin1_Set); pin1.Cleared += new SerializerComponentEventHandler(pin1_Cleared); pin1.Enabled = true; // Set to false if you want to use as output // Now, if you apply +5V or GND to I/O lines 0 and/or 1, // you should see the events fire... } static void pin1_Set(SerializerComponent sender) { Console.WriteLine("Pin 1 Set"); } static void pin1_Cleared(SerializerComponent sender) { Console.WriteLine("Pin 1 Cleared"); } } } but I get an Input or an OUtput to one of the Digital I/O Ports. Can someone please help me
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Saturday, May 10, 2008 2:44 AM
Posts: 13,
Visits: 22
|
|
| Hi I run the Prgramm with and without "serializer.run()" then i connect the Ground Pin with the Signal Pin froam the Digital I/O port or the +5V Pin with the Signal Pin. But nothing happens. what make i wrong?
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
| It also looks like you're missing a call to Serializer.StartCommunications() before your call to Serializer.Run(). Therefore, the library never starts talking w/ the Serializer. Again, refer to the examples in the link above. Best Regards!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Saturday, May 10, 2008 2:44 AM
Posts: 13,
Visits: 22
|
|
| Hi No in my Programm is _s.StartCommunication(); and _s.Run(); in my Programm the name is _s and not serializer. It´s all in the Programm, but the serializer do nothing Please help
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
| Oh, now I see your _s.StartCommunication(). It's in the wrong place. This needs to be called after you've configured your objects, and right before you call _s.Run(). Again, you should be able to follow the examples on the links above to get this figured out. Another few tests you can perform is: - Verify that you can you connect via hyperterm, and if so, note the COM port
- Ensure that you're using the same COM port in your app
- The fact that you're using 'COM40' tells me that you're using either a bluetooth connection, or a USB to serial dongle/cable. Make sure the serial connection works via hypererm first, and if bluetooth, make sure the devices are paired (using passcode '0000').
Best Regards!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Saturday, May 10, 2008 2:44 AM
Posts: 13,
Visits: 22
|
|
Thanks  The _s.StartConnection(); behind the code...... and the programm and the serializer works 
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
|
|
|