View unanswered posts | View active topics It is currently Tue Sep 02, 2014 2:56 pm






Reply to topic  [ 9 posts ] 
Can't find "Sensor12CCustomStd" in Sensor setup 
Author Message
Novice

Joined: Thu Apr 17, 2008 6:04 am
Posts: 70
Location: Plymouth, Indiana, USA
Post Can't find "Sensor12CCustomStd" in Sensor setup
Hello,
I am trying to use my Hi-Technic accellerometor. I open the sample "HTAC-test1". The end of the top line has "Sensor12CCustomStd". I've been trying to recreate the program from scratch (to help my understanding). I don't seem to have "Sensor12CCustomStd" as a sensor type choice anymore (version 2.01). I do have "Sensor12CHiTechnicAccel" -but setting up my sensor with that doesn't seem to work.
Using "Sensor12CHiTechnicAccel" doesn't open the following "includes".
#include "drivers/common.h"
#include "driver/HTAC-driver.h"
Is the sensor type not being "Sensor12CCustomStd" the reason my includes don't open?
Are there different "includes" that should be used with "Sensor12CHiTechnicAccel"?
Are the other commands like "HTACreadX()" still valid with "Sensor12CHiTechnicAccel"?
I would be grateful for any help.
Thanks,
Dave

_________________
Dad (Dave) and Adam


Wed Dec 30, 2009 5:54 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3210
Location: Rotterdam, The Netherlands
Post Re: Can't find "Sensor12CCustomStd" in Sensor setup
Are you using the version 1.2 of the driver suite? The HTAC-test1.c in version 1.2 does not use this particular sensor type. It uses the sensorLowSpeed sensor type.

You can download version 1.2 at this address: http://rdpartyrobotcdr.sourceforge.net/

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 Dec 30, 2009 6:03 pm
Profile WWW
Novice

Joined: Thu Apr 17, 2008 6:04 am
Posts: 70
Location: Plymouth, Indiana, USA
Post Re: Can't find "Sensor12CCustomStd" in Sensor setup
Hello Xandor,
I downloaded version 1.2 of the drivers. Now the sample program "HTAC-test1" lists "sensorLowSpeed" for sensor type (so that part is as expected now).
To create a new program, I used the setup sensor window to pick "12C Custom" (which gives me "sensorLowSpeed" at the end of the first program line. Cutting and pasting the rest of the "HTAC-test1" program into a new file (with the first line generated automatically from the sensor set up still can't open the two includes:
#include "drivers/common.h"
#include "driver/HTAC-driver.h"
The HTAC-test1 program compiles and runs fine, but my recreated program does not compile (due to the aforementioned errors). They look identical. What am I missing?
Thanks for the help (I enjoy the learning process),
Dave

_________________
Dad (Dave) and Adam


Thu Dec 31, 2009 1:51 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3210
Location: Rotterdam, The Netherlands
Post Re: Can't find "Sensor12CCustomStd" in Sensor setup
Did you follow the instructions video on the website I gave you in my previous post? :)

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 Dec 31, 2009 4:01 am
Profile WWW
Novice

Joined: Thu Apr 17, 2008 6:04 am
Posts: 70
Location: Plymouth, Indiana, USA
Post Re: Can't find "Sensor12CCustomStd" in Sensor setup
Hi Xander,
I missed the video before -so I didn't have the path to the include files set in "Preferences". I set the source file and include file paths. Things are much better now! Both the original "HTAC-test1" and my recreated program work the same. It is a mystery how the original "HTAC-test1" found the include files (while the path in Preferences was blank). Any ideas?
Is the path for the source file needed? Per the video the path is to an empty folder. Both the original and my recreation ran fine with the source file path blank.

The accellerometer is working great with sensor type set to sensorLowSpeed (12C Cutom from the sensor setup window). If the sensor type is set to sensorHiTechnicAccel (HiTechnicAccell from the setup window), I get a zero reading about 25% of the time for each of the three axis. This is with the sensor stationary and each axis held for a while in it's direction of maximum reading. For example with X pointed up, readings taken at 1 second intervals are: 202, 199, 204, 0, 203,200,0,202, etc. Is this a bug? Again with sensor type set to sensorLowSpeed it works great with consistent readings.

Note: program line 72 in HTAC-test1 should use line 2 instead of 3 (it gets overwritten on the display by program line 74 otherwise).

Great job, by the way, on the use of thrid party sensors in release 2.0. I seem to recall trying to use my accellerometer in 1.4 and it took alot more commands to get information from the sensor. Now it's just a single line. I love it. (Or was it just a single line before -my mind plays tricks on me sometimes.)

One last question: Is there any difference bewteen using the Sensor Setup Window and just typing in the "#pragma config(Sensor,... " line directly in the editor?

Thanks for all your help. I learned alot (like read the instructions first). :D
Dave

_________________
Dad (Dave) and Adam


Thu Dec 31, 2009 9:01 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3210
Location: Rotterdam, The Netherlands
Post Re: Can't find "Sensor12CCustomStd" in Sensor setup
Hiya Dave,

Dad and Adam wrote:
Is the path for the source file needed? Per the video the path is to an empty folder. Both the original and my recreation ran fine with the source file path blank.

The HTAC-test1.c should compile because the current folder is also in the search path of the compiler. However, if you start making your own programs that include the drivers, that might now work.

Quote:
The accellerometer is working great with sensor type set to sensorLowSpeed (12C Cutom from the sensor setup window). If the sensor type is set to sensorHiTechnicAccel (HiTechnicAccell from the setup window), I get a zero reading about 25% of the time for each of the three axis. This is with the sensor stationary and each axis held for a while in it's direction of maximum reading. For example with X pointed up, readings taken at 1 second intervals are: 202, 199, 204, 0, 203,200,0,202, etc. Is this a bug? Again with sensor type set to sensorLowSpeed it works great with consistent readings.

The reason for that is because when you set the sensor to sensorHiTechnicAccel you have two driver vying for access to the sensor. The first one is the built in one, the sensorHiTechnicAccel and the second one, the one you're using from my driver suite. As you can imagine, that's not going to work very well and will give you the results you were seeing :)

Quote:
Note: program line 72 in HTAC-test1 should use line 2 instead of 3 (it gets overwritten on the display by program line 74 otherwise).

Noted and fixed for the next version, thanks!

Quote:
Great job, by the way, on the use of thrid party sensors in release 2.0. I seem to recall trying to use my accellerometer in 1.4 and it took alot more commands to get information from the sensor. Now it's just a single line. I love it. (Or was it just a single line before -my mind plays tricks on me sometimes.)

Perhaps I only allowed you to get one axis at a time, I don't remember. I've tried to optmise the use of the drivers quite a bit over the past few versions.

Quote:
One last question: Is there any difference bewteen using the Sensor Setup Window and just typing in the "#pragma config(Sensor,... " line directly in the editor?

Nope, there isn't. As long as you use the same notation it should be fine. I am constantly copying and pasting the header including the pragma part from one test program to a new one :)

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 Dec 31, 2009 10:49 am
Profile WWW
Novice

Joined: Thu Apr 17, 2008 6:04 am
Posts: 70
Location: Plymouth, Indiana, USA
Post Re: Can't find "Sensor12CCustomStd" in Sensor setup
Hello Xander,
When I saw "HiTechnicAccell" in the list of sensor types it seemed natural to pick it (since I'm using a Hi Technic Accellerometer). Thanks to your reponses, I have a better understanding of what's going on.
I am all set and my project can proceed!

Thanks again,
Dave

_________________
Dad (Dave) and Adam


Thu Dec 31, 2009 11:42 am
Profile
Novice

Joined: Thu Apr 17, 2008 6:04 am
Posts: 70
Location: Plymouth, Indiana, USA
Post Re: Can't find "Sensor12CCustomStd" in Sensor setup
As I ponder things, I am curious about the folder for the "source file". Per the video, I made a "ROBOTC" folder and called out the path to it in "Perferences" for the "Directory for Source Files".
Is it intended that my program files go in the ROBOTC folder? Or does that folder stay empty?

Thanks for adding to my understanding,
Dave

_________________
Dad (Dave) and Adam


Sun Jan 03, 2010 5:41 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3210
Location: Rotterdam, The Netherlands
Post Re: Can't find "Sensor12CCustomStd" in Sensor setup
Your programs and projects go in there :) You could name it "I like small bunnies" instead, it wouldn't matter. As long as it's the same in the preferences :) Mine is called "NXT-RobotC" because I also have a "NXT-Lejos", "NXT-nxtOsek" and "NXT-NXC", "Arduino" and many others in my projects directory :)

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 03, 2010 5:48 pm
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.