Author |
Message |
cheechr1
Rookie
Joined: Sun Jan 23, 2011 3:14 am Posts: 16
|
 Has EV3 I2C for 3rd party sensors been fixed?
Just wondering if 3rd Party Sensors drivers(eg IR Seeker V2, HT IRDIST) have been updated to work with the EV3?
|
Sat Dec 13, 2014 1:42 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Yes  I just need to tweak the driver suite a bit to make it work a little more smoothly. = 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 Dec 24, 2014 11:24 am |
|
 |
Sigtrygg
Rookie
Joined: Mon Apr 08, 2013 12:50 pm Posts: 30
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Hello Xander!
I want to make a Robot with EV3 and HT compass and Dexter GPS. Did you make the Drivers for them already? And if yes, where can I download them?
Best regards,
Sigtrygg
|
Tue Jan 06, 2015 1:18 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
The 3rd party sensor driver has not been fully tested yet with the EV3. Some drivers work fine, I have tested several. Others are still exhibiting issues. The functions in ROBOTC, however, work fine  Any updated I make, will be put on the Github repository here: https://github.com/botbench/robotcdriversuite= 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 Jan 07, 2015 3:03 am |
|
 |
Sigtrygg
Rookie
Joined: Mon Apr 08, 2013 12:50 pm Posts: 30
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Thank you for your quick answer!
The new concept with the struct variables and equal commands is very good. I defined my sensor "HTCompass" and are able to apply commands like initSensor(&HTCompass, S1), readSensor(&HTCompass), sensorCalibrate(&HTCompass), sensorStopCalibrate(&HTCompass) and can use values like HTCompass.relativeHeading, HTCompass.heading but I can't find the command for setting the target heading. I don't understand how the relative target is calculated without setting the target heading.
Maybe you can help me?
Best regards,
Sigtrygg
|
Wed Jan 07, 2015 4:25 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Without the target heading, it is not possible to calculate the relative heading without a target. You can set the target to whatever you'd like. I've put the code below that show you how to do it. This is also found in hitechnic-compass-test1.c.  |  |  |  | Code: /** * hitechnic-compass.h provides an API for the HiTechnic Compass Sensor. This program * demonstrates how to use that API. * * Changelog: * - 0.1: Initial release * - 0.2: More comments * * License: You may use this code as you wish, provided you give credit where it's due. * * THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 4.10 AND HIGHER
* Xander Soldaat (xander_at_botbench.com) * 25 November 2009 * version 0.2 */
#include "hitechnic-compass.h"
task main () { displayCenteredTextLine(0, "HiTechnic"); displayCenteredBigTextLine(1, "Compass"); displayCenteredTextLine(3, "Test 1"); displayTextLine(5, "Press enter"); displayTextLine(6, "to set target");
sleep(2000); eraseDisplay();
// Create struct to hold sensor data tHTMC compass;
// Initialise and configure struct and port initSensor(&compass, S1);
time1[T1] = 0; while(true) { // Reset the target no more than once a second // This also helps with debouncing the [enter] button. if (time1[T1] > 1000) { eraseDisplay(); displayTextLine(1, "Changing"); displayTextLine(2, "target"); sleep(500);
// Read the data from the sensor readSensor(&compass);
// Set the current heading as the value for the offset to be used as the // new zero-point for the relative heading returned by // compass.relativeHeading compass.offset = compass.heading;
playSound(soundBlip); while(bSoundActive) sleep(1); time1[T1] = 0; }
// Get the true heading and relative heading from the sensor and // display them on the screen. while(!getXbuttonValue(xButtonEnter)) { // Read the data from the sensor readSensor(&compass); eraseDisplay(); displayTextLine(1, "Reading"); displayTextLine(2, "Target: %4d", compass.offset); displayTextLine(4, "Abs: %4d", compass.heading); displayTextLine(5, "Rel: %4d", compass.relativeHeading); displayTextLine(6, "Press enter"); displayTextLine(7, "to set target"); sleep(100); } } } |  |  |  |  |
_________________| 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 Jan 08, 2015 5:40 am |
|
 |
Sigtrygg
Rookie
Joined: Mon Apr 08, 2013 12:50 pm Posts: 30
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Great! Thank you very much, Xander! I know, it is a lot of work to make all these drivers. I try to apply this API for my robot and will show the results with code here. Best regards, Sigtrygg
|
Thu Jan 08, 2015 12:22 pm |
|
 |
Sigtrygg
Rookie
Joined: Mon Apr 08, 2013 12:50 pm Posts: 30
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Hello Xander! I have tried the hitechnic-compass.c example with hitechnic-compass.h and common.h, but it didn't work with my robot. And although I have defined the compass sensor as I2CCustom it is shown as I2CGenericEV3 into the debug sensor window. The compass shows once values and then it blocks completely. I can't explain that. Do you have a hint for me? I added two screencopies with debug stream and settings. Best regards, Sigtrygg
|
Fri Jan 09, 2015 2:10 pm |
|
 |
Sigtrygg
Rookie
Joined: Mon Apr 08, 2013 12:50 pm Posts: 30
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Hello Xander!
I guess my EV3-brick doesn't work. I tried the compass with the LEGO-Software and it blocked, too. Then I tried the sonar sensor with the same result.
I bought the brick from ebay. Don't waste your time and please forget my last post!!!!
|
Sat Jan 10, 2015 11:47 am |
|
 |
Sigtrygg
Rookie
Joined: Mon Apr 08, 2013 12:50 pm Posts: 30
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Oh! The brick is o.k!
I tried HT compass sensor and sonar sensor with LEGO Software and it works. I made a mistake because I never used this Software. Sorry for confusion!
So, why doesn't work the compass sensor with my RobotC?? Is there anybody who has the same Problems?
Bye, Sigtrygg
|
Sat Jan 10, 2015 2:04 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Hey there, I just tested my HT Compass sensor with my EV3 using the latest internal version of the drivers and it works very nicely. I will do a bit more testing and then I'll commit to the Github repo where you can download it  = 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 Jan 11, 2015 11:58 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
All done, get your fresh copy from: https://github.com/botbench/robotcdriversuiteThere will still be bugs and a LOT more testing is needed, but the compass sensor works and the code to make that happen is fairly cross platform. I need to check the other drivers too, I haven't had a chance to do that yet  = 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 Jan 11, 2015 12:08 pm |
|
 |
Sigtrygg
Rookie
Joined: Mon Apr 08, 2013 12:50 pm Posts: 30
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Hello Xander! Thank you very much for your support!! The compass is running very well, now!I hope, I can introduce my new robot project, soon. But there is still a lot to do for me. Best regards, Sigtrygg
|
Sun Jan 11, 2015 1:55 pm |
|
 |
giuseppe.fava
Rookie
Joined: Thu Jan 15, 2015 10:57 am Posts: 9 Location: Italy
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
Hi everyone (sorry for my poor english... I'm italian) I'm trying to run a simple program for hitechnic IR Seeker V2 in my new EV3, but I got error I'm using RobotC 4.27 with latest version of robotcdriversuite-master this is my program where am I wrong?
|
Thu Jan 15, 2015 12:14 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Has EV3 I2C for 3rd party sensors been fixed?
_________________| 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 Jan 15, 2015 12:39 pm |
|
|