Released: Driver suite for RobotC beta1
Author |
Message |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Released: Driver suite for RobotC beta1
Hello everyone, After many weeks of writing and testing, I'm ready to release my first suite of RobotC drivers for quite a number of devices and sensors. I've tried to make sure that every API call was documented and (almost) all drivers have an example program to demonstrate how to use the driver. The documentation was created using Doxygen. The drivers make use of a standard header file that does most of the heavy I2C lifting, this allows me to keep the drivers small and make writing drivers for new devices very easy. RobotC already has built-in drivers for some of the devices, the idea was to provide more control over when they are polled, at what bus speed and more importantly allow access to the less frequently used functionality of these sensors. The suite includes drivers for the following devices: - HiTechnic EOPD sensor (allows sensitivity of sensor to be set) - HiTechnic Accelerometer sensor - HiTechnic Gyroscopic sensor (including calibration functions) - HiTechnic Compass (including recalibration functions) to be released this weekend - HiTechnic Color sensor (including recalibration functions) - HiTechnic IR Seeker (allows access to individual IR sensors) - HiTechnic IR Link (allows control over PF motors, both ComboDirect and ComboPWM mode) - HiTechnic Touch MUX sensor - HiTechnic ProtoBoard - Mindsensors NXT Vision Subsystem (can detect colliding blobs and merge them) - MAXIM MAX127 8 channel 12 bit AD converter - MAXIM MCP23008 8 channel IO expander A big thanks to HiTechnic for providing me with the sensors to write the drivers for. You can download the source code here: https://sourceforge.net/projects/rdpartyrobotcdr/You can view all the documentation here: http://rdpartyrobotcdr.sourceforge.net/ ... index.htmlPlease note that all the documentation is included with the driver's zip file, so you can view it offline, too. I hope you enjoy using them as much as I enjoyed writing them! Regards, Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Thu Mar 26, 2009 3:52 pm |
|
 |
SteveTan86
Rookie
Joined: Fri Mar 27, 2009 10:36 am Posts: 23 Location: Singapore or Sydney, Australia
|
 Re: Released: Driver suite for RobotC beta1
wow this is great! THANKS!
Will you be submitting this to HiTechnic or mindsensors? It would be good (for the less initiated) to be able to find these drivers off the HiTechnic and mindsensors website too.
Anyway great job! I really appreciate all the hardwork you've put into this. This is going to help me a lot with my projects!
_________________ Is it wrong for us to love killer robots?
|
Fri Mar 27, 2009 10:51 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Released: Driver suite for RobotC beta1
Thanks for the compliment, I really appreciate it. It was in fact Steve from HiTechnic who asked me to write the drivers for their sensors, so they know  A link to the drivers on the HT website is forthcoming. I haven't spoken to Mindsensors yet, but Deepak Patil (one of the guys there) knows about the work I have done on a previous version of the camera driver. I will tell him about the new one, too Regards, Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Fri Mar 27, 2009 11:24 am |
|
 |
SteveTan86
Rookie
Joined: Fri Mar 27, 2009 10:36 am Posts: 23 Location: Singapore or Sydney, Australia
|
 Re: Released: Driver suite for RobotC beta1
Hi Xander,
I was looking through the driver for the HiTechnic color sensor. It seems that you have left out "black level" calibration function? I'm guessing that "white level" calibration is enough but is there any difference between the usage of "black level" and "white level" calibration (besides of course the obvious fact that both functions calibrates the sensors based on different colors)?
I'm guessing that "black level" calibration is able to more effectively eliminate the distorted readings caused by background lighting? Please correct me if I am wrong. I'm still waiting for my sensors to arrive. I've just gotten my NXT set and am quite new to the world of robotics.
_________________ Is it wrong for us to love killer robots?
|
Sun Mar 29, 2009 7:33 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Released: Driver suite for RobotC beta1
Hiya Steve, Black level calibration is done once at HiTechnic and shouldn't have to be done again. There is currently no way to recalibate the sensor's black level by users; it's not something I've restricted with my drivers. White level calibration is all you need  I've asked HT about this and that is what they told me. Regards, Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Sun Mar 29, 2009 8:12 am |
|
 |
SteveTan86
Rookie
Joined: Fri Mar 27, 2009 10:36 am Posts: 23 Location: Singapore or Sydney, Australia
|
 Re: Released: Driver suite for RobotC beta1
ah, I see. Thanks for the prompt response.
_________________ Is it wrong for us to love killer robots?
|
Sun Mar 29, 2009 8:41 am |
|
 |
SteveTan86
Rookie
Joined: Fri Mar 27, 2009 10:36 am Posts: 23 Location: Singapore or Sydney, Australia
|
 Re: Released: Driver suite for RobotC beta1
hmmm, another question.
Been playing around with the EOPD sensors this morning with the test file that you have written. It occurs to me that the sensor is able to pick up readings at a range of 15cm from target in "short range" mode but is unable to do so in "long range" mode. In "long range" mode, the max distance I'm able to get a reading from is about 9-10cm.
I suppose this is because in "long range" mode the sensor is detecting for its own light? But while in short range mode it is "accepting" external light sources?
_________________ Is it wrong for us to love killer robots?
|
Tue Mar 31, 2009 9:30 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Released: Driver suite for RobotC beta1
I am not sure why that is. I noticed it, too and I think it has something to do with my driver. The switching on and off of the light acts as a way for the sensor to switch sensitivity modes, it doesn't actually switch anything off inside. It allows the sensor to be used as an analogue sensor, rather than a digital one. I will look into this and get back to you. Regards, Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Wed Apr 01, 2009 12:54 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Released: Driver suite for RobotC beta1
Steve,
Were you using the HTEOPDgetProcessed() or HTEOPDgetRaw() call?
Regards, Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Wed Apr 01, 2009 1:42 am |
|
 |
SteveTan86
Rookie
Joined: Fri Mar 27, 2009 10:36 am Posts: 23 Location: Singapore or Sydney, Australia
|
 Re: Released: Driver suite for RobotC beta1
Both. And both were experiencing the same discrepancies.
_________________ Is it wrong for us to love killer robots?
|
Wed Apr 01, 2009 1:58 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Released: Driver suite for RobotC beta1
K, well I'll look into it and get back to you. I'm at work right now and my NXTs are at home so it'll have to wait until I get back  Regards, Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Wed Apr 01, 2009 2:18 am |
|
 |
SteveTan86
Rookie
Joined: Fri Mar 27, 2009 10:36 am Posts: 23 Location: Singapore or Sydney, Australia
|
 Re: Released: Driver suite for RobotC beta1
No worries. Take your time! haha
If you need help, just ask. I'll be glad to contribute whatever I can.
Regards, Steve
_________________ Is it wrong for us to love killer robots?
|
Wed Apr 01, 2009 2:34 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Released: Driver suite for RobotC beta1
If you wouldn't mind, could you submit your bug on my bug tracking site: https://apps.sourceforge.net/mantisbt/r ... n_page.phpI enabled it 10 mins ago and you could have the dubious honour of having submitted the very first bug! Your grand children will speak of this day while roasting marshmallows over the fire. I promise to actually use the bug tracking site, unlike other software projects we are familiar with! Regards, Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Wed Apr 01, 2009 2:37 am |
|
 |
SteveTan86
Rookie
Joined: Fri Mar 27, 2009 10:36 am Posts: 23 Location: Singapore or Sydney, Australia
|
 Re: Released: Driver suite for RobotC beta1
Oh what an honor! Tis deed, I shall gladly do. Tears, tears are flowing down my cheeks. hahaha
Anyway the bug is submitted!
Regards,
Steve
_________________ Is it wrong for us to love killer robots?
|
Wed Apr 01, 2009 5:23 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Released: Driver suite for RobotC beta1
OK, I did quite extensive testing and I have some preliminary results. Setup:I wrote a test program in NXT-G with the official EOPD NXT-G block. NXT-G is the only officially supported programming language for the HT sensors, so its results I took as leading.  The RobotC program was the one included with my driver without any changes. My test setup ensured that I was going to be able to reproduce fairly accurately the same distances I was taking readings from. Method:First I tested the NXT-G program which displayed both the processed and raw data. I measured at distances between 2 and 16" with 1" intervals. I picked inches because that was the resolution of the lines on the green cutting board. After that I repeated it for the RobotC program. Results:Below you will see the results of my tests:   As you can see, there is something *really* wrong with the long range readings for RobotC. There is obviously a problem with the driver. I am not sure what it is yet, but I'll figure it out. The nice thing is that the short range readings are inline with what we see with the NXT-G block. That part, at least, seems to be working ok. Conclusions:The long range part of the EOPD driver is *really* broken. I'll try to track it down. The short range stuff works fine. Regards, Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Wed Apr 01, 2009 3:09 pm |
|
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|