View unanswered posts | View active topics It is currently Thu Oct 23, 2014 12:07 am






Reply to topic  [ 9 posts ] 
Problem with HTIRS2 configuration 
Author Message
Rookie

Joined: Wed May 09, 2012 10:00 am
Posts: 3
Post Problem with HTIRS2 configuration
Hi,
I have a problem with HTIRS2. I've tried to make configuration simillar to this I've seen in example file. However I still receive an information that I haven't set configuration properly. Here is my program:

Code:
#pragma config(Sensor, S1,     Color_Right,    sensorCOLORBLUE)
#pragma config(Sensor, S2,     IR_Sensor,      sensorI2CCustom)
#pragma config(Sensor, S3,     UHF_Sensor,     sensorSONAR)
#pragma config(Sensor, S4,     Color_Left,     sensorCOLORBLUE)
#pragma config(Motor,  motorA,          Motor_Right,   tmotorNormal, PIDControl, reversed, encoder)
#pragma config(Motor,  motorB,          Motor_Left,    tmotorNormal, PIDControl, reversed, encoder)
#pragma config(Motor,  motorC,          Motor_Lift,    tmotorNormal, PIDControl, encoder)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "drivers\LEGOUS-driver.h"
#include "drivers\HTIRS2-driver.h"

void Sensors_Configuration() // konfiguracja sensorow
{
  bFloatDuringInactiveMotorPWM = false;

  while(true)
  {
        if (HTIRS2setDSPMode(IR_Sensor, DSP_1200))
        break;
    }
  }
}

task main()
{
  Sensors_Configuration();
 
(...)

}
 


Wed May 09, 2012 10:10 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3225
Location: Rotterdam, The Netherlands
Post Re: Problem with HTIRS2 configuration
I fixed your program (there were too many braces) and it compiles fine. Can you be more specific about the error you are seeing?

I see you are using LEGOUS-driver.h and have configured S3 as sensorSONAR and not sensorI2CCustom9V as it should be, if you're really using my drivers.

What version of ROBOTC? Which version of my driver suite? Anything else you think might be pertinent to tracking down this issue.

- Xander

Code:
#pragma config(Sensor, S2,     IR_Sensor,      sensorI2CCustom)
#pragma config(Sensor, S3,     UHF_Sensor,     sensorI2CCustom9V)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "drivers\LEGOUS-driver.h"
#include "drivers\HTIRS2-driver.h"

void Sensors_Configuration() // konfiguracja sensorow

  while(true)
  {
    if (HTIRS2setDSPMode(IR_Sensor, DSP_1200))
      break;
  }
}

task main()
{
  Sensors_Configuration();
}

_________________
| 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 May 09, 2012 12:19 pm
Profile WWW
Rookie

Joined: Wed May 09, 2012 10:00 am
Posts: 3
Post Re: Problem with HTIRS2 configuration
Hi, I apologize for such late repley, but i couldn't manage to check this robot. Anyway the problem wasn't braces in my program (I copied old version of my program), but the message:
3rd party driver ERROR
You have not setup the sensor port correctly. Please refer to one of the examples.


Last edited by XXXOOO on Wed May 16, 2012 9:23 am, edited 4 times in total.



Wed May 16, 2012 9:12 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3225
Location: Rotterdam, The Netherlands
Post Re: Problem with HTIRS2 configuration
What do you see when you compile the program I pasted?

You have not answered all of my questions, yet. More info == better help.

- 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 May 16, 2012 9:18 am
Profile WWW
Rookie

Joined: Wed May 09, 2012 10:00 am
Posts: 3
Post Re: Problem with HTIRS2 configuration
Well, the problem was with definition of sonar sensor - as you mentioned, it should be I2Custom9V not Sonar So the problem is solved. Thank you for your help :)


Wed May 16, 2012 9:23 am
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: Problem with HTIRS2 configuration
mightor wrote:
More info == better help.


Isn't the full equation:
Code:
        if(more_info == true)
        {
           better_help = true;
        }
        else if(more_info == false && want_better_help == true)
        {
           nxtDisplayCenteredBigTextLine(2, "Please give more info about your problem!");
        }


:mrgreen: :wink:

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Wed May 16, 2012 9:24 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3225
Location: Rotterdam, The Netherlands
Post Re: Problem with HTIRS2 configuration
No, no, I think you'll find it's
smart-ass == kick ban

:)

- 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 May 16, 2012 9:34 am
Profile WWW
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: Problem with HTIRS2 configuration
I will not dignify that with a response. Oops, I guess I just did :lol:

[BOWING & SCRAPING] I am extremely in teh apologies, oh master moderator. :bow: I was just trying to be funny :crying: . PLEASE NO BAN ME!!! I NO-LIKE TEH BAN!!! :P NeXT-Generation sorry, sorry, so sorry.[/BOWING & SCRAPING]

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Wed May 16, 2012 10:15 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3225
Location: Rotterdam, The Netherlands
Post Re: Problem with HTIRS2 configuration
I'll let you get away with it just this once!

- 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 May 16, 2012 11:28 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 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

Search for:
Jump to:  



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