General IOWizard Issues
Navigates to RoboticsConnection.com Home RoboticsConnection.com HomePage
RoboticsConnection User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


123»»»

General IOWizard Issues Expand / Collapse
Author
Message
Posted Wednesday, January 13, 2010 11:48 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Monday, December 27, 2010 5:21 PM
Posts: 55, Visits: 139
I recently purchases the IOWizard and connected it to an I2C Expansion which is connected to a Serializer 3.0.

I've read through the documentation and the API docs to get a better understanding of how this works but its unclear.

Basically what I want to do is just read from the sensors connected to the IOWizard but I am unsure how to do so. The .NET libraries require an address to read an i2c device. So am assuming the IOWizard is at address 100d.

If that is the case - how would i go about reading fromthe analog and digital ports? Here is the current configuration wiht the connected components

1. 3x MaxEZ1 Sonars connected to the digital ports
2. 2x Infrared sensors connected to the analog ports
3. 1x Servo connected to a digital port
4. 1x Ambient temperature sensor connected to an analog port

I was able to extract from reading some of the documents that by issueing a command in putty like so will

i2c r 100 20

will give me some sort of state. But its not clear to me what 20 means and what each of the items represent. It would be great if some light could be shed on this subject.

Lastly - I am seeing something funky with the IOWizard. It might just be me using incorrectly. But basically I connected a servo to the iowizard as well. When i remove the servo from the iowizard - no leds light up on the iowizard. However, when i reconnect the servo - the leds start flickering.

Is this normal behavior?

Please advise.. Thank you!


-Danny

Animusoft
RUG Community
Post #1533
Posted Thursday, January 14, 2010 6:06 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
Well, it's hard to see, but there's a link on the IOWizard page for the User Guide. 

    http://www.roboticsconnection.com/multimedia/docs/IOWizardUserGuide.pdf

At the bottom, it mentions how to communicate with the board via the Serializer.   You can look at the Generic I2C documentation to see how to talk to it (once you understand how to communicate w/ it from a terminal app).  Let us know if you get stuck!

I hope to launch the new site next week, at which point the link will be easier to see!

Best Regards!

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

Post #1544
Posted Thursday, January 14, 2010 6:20 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Monday, December 27, 2010 5:21 PM
Posts: 55, Visits: 139
Thanks for the info - however i read through the entire doc wasnt much help. I will look into the I2C specifications to see if that sheds any light onto the subject.



-Danny

Animusoft
RUG Community
Post #1548
Posted Thursday, January 14, 2010 6:34 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Monday, December 27, 2010 5:21 PM
Posts: 55, Visits: 139
Is there any information you provide in my scenario?

In regards to the servo issue when its plugged into the iowizard and then when its not.

Recall that when its plugged in - the iowizards led light up - and seem to work.. then it can be accessed via putty. however if you remove the servo from the iowizard - then you cannot access the iowizard at all..

The more information you can provide the better.



-Danny

Animusoft
RUG Community
Post #1550
Posted Thursday, January 14, 2010 9:38 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Monday, December 27, 2010 5:21 PM
Posts: 55, Visits: 139
Jason,

Ok so I've been banging my head against the desk trying to figure this out.

Please if you can shed some light on this subject.

Here is the situation.. I have the IOWizard connected to an I2C Expansion board and then that is connected to the serializer 3.0. There is only one sensor on the iowizard (ambient temperature sensor) at this point and im attempting to read from it. Before plugging it in i see 0's or 1's across the board by issue the i2c r 100 20 command in putty. once I connect the ambient temperature sensor on port 0 and of the analogs i see the numbers jump on the analog bytes. the last 10 bytes are left at 0 and 1.

Now I am assuming that the first two digits returned are the the one for the ambient temperature sensor. Is this correct?

If that is the case then they are returning 2 and 82 in this given situation. Which should be an indicator of the temperature. However from the temperature is not 84 nor is it 183.2. its more like 72. I took a reading from the area and that was the temperature. Mind you the sensor works fine when i plug it in directly to the serializer.

From there Ive been doing some tests with putty.

I understand the i2c command and from what I can make out issuing the following command

i2c r 100 20


Will read from the IOWizard the first 20 bytes. The first 10 bytes represent the analog ports and the last 10 represent the digital ports. From what I gather - each analog port is made up of the two bytes. So does that mean the first two digits that return from issueing the previous command?

Now when reading from the serializer i noticed there was a note that said I dont have to left shift since its doing it for me - does that imply i dont have to add the first two bytes together to get the value of whatever is connected?

I feel like im chasing my tail here. Please advise.


-Danny

Animusoft
RUG Community
Post #1551
Posted Thursday, January 14, 2010 10:18 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Monday, December 27, 2010 5:21 PM
Posts: 55, Visits: 139
Here is a code example in C# i whipped up to see if there was any difference but its the same result that i get in putty. Basically I am having trouble understanding how to interpret the results.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication9
{
class Program
{
static void Main(string[] args)
{
RoboticsConnection.Serializer.Serializer serializer = new RoboticsConnection.Serializer.Serializer();
serializer.BaudRate = 19200;
serializer.PortName = "COM5";
serializer.Units = RoboticsConnection.Serializer.Ids.Units.Metric;

serializer.StartCommunication();

RoboticsConnection.Serializer.Sensors.I2CDevice i2cdevice = new RoboticsConnection.Serializer.Sensors.I2CDevice(serializer);

string response = i2cdevice.Read(0x64, "20");
//string[] tokens = response.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);

Console.WriteLine(response);

serializer.StopCommunication();
}
}
}


With a result in the console window of the following
Trying port: COM5
2 97 2 44 1 108 0 247 0 174 0 0 0 0 0 0 0 0 0 0
Press any key to continue . . .


Recall there is only one sensor plugged in on port 0 of the analog ports and its the ambient temperature sensor.



-Danny

Animusoft
RUG Community
Post #1552
Posted Friday, January 15, 2010 8:30 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Monday, December 27, 2010 5:21 PM
Posts: 55, Visits: 139
One more thing to add.. If I remove all sensors from the IOWizard and connect an IR sensor - the ones from RC.COM for 9 bucks - then the IOWizard LEDs dont power on. I tried connecting to both the analog and the digital ports - both with the same resultant.

-Danny

Animusoft
RUG Community
Post #1555
Posted Tuesday, January 19, 2010 7:20 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Monday, December 27, 2010 5:21 PM
Posts: 55, Visits: 139
Has anyone found a solution to this problem or can anyone shed some light on this subject? I have been stuck for over a week now without resolve.

-Danny

Animusoft
RUG Community
Post #1558
Posted Tuesday, January 19, 2010 8:18 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
Danny,

I have attached a 'GenericI2CCommandExample' application. 

    http://www.roboticsconnection.com/multimedia/examples/Serializer/GenericI2CCommand/GenericI2CCommandExample.zip

It is a .NET app that leverages the Serializer .NET Lib, and allows you to talk to I2C devices via a simple GUI.  The Visual Studio Solution should be built using either Visual Studio 2005/2008/2010, or Visual Studio Express C# Edition.   Once you've built the app, make sure you have your Serializer plugged in, and the IOWizard plugged into the Serializer (via I2C), power them up, then run the app.   Choose the appropriate COM port from the drop down box, then hit the 'Connect' button.  You will see a green 'Connected' label appear (if you have everything connected right). 

Type in '100' in the I2C Address box (corresponding to the default i2c address of the IOWizard), then hit the 'Set Address' button.   Type in '20' into the Number of Bytes requested box, then hit the 'Read Bytes' button.  You will see 20 values returned from the IOWizard display (I just verified this).  You can do similar actions w/ the 'Write Bytes' button.

Now, go back and look at the C# code to see how to use the Generic I2C Device object, and then you can integrate it into your apps.

Best Regards,

Jason

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

Post #1559
Posted Tuesday, January 19, 2010 8:26 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
Hey Danny,

Also, I just verified seeing problems using the Sharp IR sensors with the IOWizard.  I plugged in other analog sensors, and they work fine, so we're thinking it may be noise coming from the Sharp IRs...Ringo will post more info tomorrow.

Best Regards!

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

Post #1560
« Prev Topic | Next Topic »

123»»»

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 3:24pm

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.172. 11 queries. Compression Disabled.