View unanswered posts | View active topics It is currently Tue Sep 02, 2014 7:33 am






Reply to topic  [ 9 posts ] 
bug with RGB (v3.51) 
Author Message
Rookie

Joined: Wed Oct 31, 2012 8:20 am
Posts: 2
Post bug with RGB (v3.51)
Hi.
I updated my robotC (3.04 to 3.51) but my RGB sensor bug.

Code:
#pragma config(Sensor, S3,     RGB,            sensorCOLORFULL)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{
   int val, raw, R, G, B;
  short ColorTab[3]={0,0,0};

while (true)
   {
      val = SensorValue (RGB);
      raw = SensorRaw (RGB);
      nxtDisplayCenteredTextLine (1, "%d : %d", val, raw);

      getColorSensorData(RGB, colorRaw, &ColorTab );   //fonction qui permet de stocker dans un tableau ColorTab les valeurs bruts du capteur RGB
     R = ColorTab[0];   //affecte dans R,G,B les differantes valeurs mesurees
     G = ColorTab[1];
     B = ColorTab[2];
     nxtDisplayCenteredTextLine (3, "%d / %d / %d", R, G, B);
   }

}


This code returns good values in R, G and B with RobotC 3.04, but in 3.51, sensorRaw and getColorSensorData return juste "0" :-(
Or it is possible to use the color sensor v2 by HiTechnic with RobotC 3.04?!
please help me quickly :bow:
thx


Wed Oct 31, 2012 8:31 am
Profile
Rookie

Joined: Mon Jan 07, 2013 6:16 pm
Posts: 4
Post Re: bug with RGB (v3.51)
I just spent 3 hours debugging my code before i found this bug report.
Tried running the example ColorSensor.c (LEGO Color Sensor) and that doesn't work either.


Mon Jan 07, 2013 6:20 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3209
Location: Rotterdam, The Netherlands
Post Re: bug with RGB (v3.51)
The LEGO Colour Sensor and the HiTechnic Colour Sensor are two completely different sensors. For the HT one, you need to use sensorI2CHiTechnicColor and not sensorCOLORFULL, which is for the LEGO sensor.

= 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]


Tue Jan 08, 2013 3:10 am
Profile WWW
Rookie

Joined: Mon Jan 07, 2013 6:16 pm
Posts: 4
Post Re: bug with RGB (v3.51)
I can speak for flymic88 but I use the LEGO Color Sensor.


Tue Jan 08, 2013 5:08 am
Profile
Rookie

Joined: Mon Jan 07, 2013 6:16 pm
Posts: 4
Post Re: bug with RGB (v3.51)
For a longer explanation:
When running the example code the main screen that shows AtoD, Raw and Value does not work. If I change mode to e.g. RED (pushing left/right button) than all the values are displayed in realtime and with correct values.
So the problem seen to be when the sensor is in RGB mode


Tue Jan 08, 2013 5:18 am
Profile
Rookie

Joined: Wed Oct 31, 2012 8:20 am
Posts: 2
Post Re: bug with RGB (v3.51)
Thx
Well my competition passed, I was able to put on 2 sensors with the version 3.08 of robotC with good driver.
I understood why this bug, but I have pus to make without.
Thank you all the same


Fri Jan 25, 2013 6:09 am
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 602
Post Re: bug with RGB (v3.51)
This issue is related to the addition of pointers/recursion to the firmware. Looks like every build from 3.50 moving forward has had this issue, but you're the first one to report it.

We're working on a fix at the moment in firmware and will have a new BETA release soon that will have the fix. I'll send you an e-mail or a PM when this occurs.

Thanks!

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Wed Jan 30, 2013 10:16 am
Profile
Rookie

Joined: Mon Jan 07, 2013 6:16 pm
Posts: 4
Post Re: bug with RGB (v3.51)
Hi
Is this fixed in the new release?


Sat Apr 27, 2013 7:29 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3209
Location: Rotterdam, The Netherlands
Post Re: bug with RGB (v3.51)
Yes, the colour sensor works very well in 3.60.

= 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]


Sat Apr 27, 2013 7:56 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.