Serializer I/O Ports
Navigates to RoboticsConnection.com Home RoboticsConnection.com HomePage
RoboticsConnection User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Serializer I/O Ports Expand / Collapse
Author
Message
Posted Sunday, March 30, 2008 1:25 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior 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

Post #270
Posted Sunday, March 30, 2008 9:11 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior 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

Post #271
Posted Sunday, March 30, 2008 4:44 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
It looks like you're missing a 'serializer.Run()' call in main().

Please see this post for more info.

http://www.roboticsconnection.com/userForums/Topic4-6-1.aspx

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com

Post #274
Posted Monday, March 31, 2008 3:23 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior 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?

Post #275
Posted Monday, March 31, 2008 7:38 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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

Post #276
Posted Tuesday, April 01, 2008 7:47 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior 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

Post #281
Posted Tuesday, April 01, 2008 9:27 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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

Post #282
Posted Wednesday, April 02, 2008 7:06 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior 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

Post #287
Posted Wednesday, April 02, 2008 7:45 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
Excellent!  Good to hear!

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com

Post #289
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: jsummerour, ringo

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 12:07pm

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.156. 14 queries. Compression Disabled.