|
Page 1 of 1
|
[ 6 posts ] |
|
| Author |
Message |
|
johnjkjk
Rookie
Joined: Sat Mar 07, 2009 5:53 am Posts: 3
|
 9V from Analogue pin
Hi there, I'm trying to use the Analogue pin as a power source for an I2C sensor application and SensorType[my_sensor]=sensorI2CCustom9V; doesn't do anything to the pin- it's not supplying power. I've read that you can use 'sensorI2CCustomStd9V' but my compiler doesn't recognise this! It worked fine with NXC so I know my hardware is okay  I also only need 10 mA with a 5V regulator and sensor, so I'm certain that I'm not drawing too much current. I'm using V1.40 753. Any suggestions?
|
| Sat Mar 07, 2009 7:07 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
 Re: 9V from Analogue pin
Hiya John,
Try using the sensorI2CCustom9V sensor type. Did you try configuring it with the motor+sensor wizard doodad?
Regards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sat Mar 07, 2009 7:54 am |
|
 |
|
johnjkjk
Rookie
Joined: Sat Mar 07, 2009 5:53 am Posts: 3
|
 Re: 9V from Analogue pin
Hi there,
No- I'm not using the wizard- I have: const tSensors my_sensor = S1; (header) SensorType[my_sensor]=sensorI2CCustom9V; (task main)
I2C works fine but can see no change in the analogue pin.
John
|
| Sun Mar 08, 2009 5:43 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
 Re: 9V from Analogue pin
No, I was suggesting you try using the wizard and see if it works for you then  Regards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sun Mar 08, 2009 6:08 am |
|
 |
|
johnjkjk
Rookie
Joined: Sat Mar 07, 2009 5:53 am Posts: 3
|
 Re: 9V from Analogue pin
the wizard doesn't work either 
|
| Sun Mar 08, 2009 11:23 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
 Re: 9V from Analogue pin
I'm not sure how I can be of any more help to you. Perhaps one of the developers can shed some light on this? You can try writing an email to support@robotc.netRegards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sun Mar 08, 2009 12:06 pm |
|
|
|
Page 1 of 1
|
[ 6 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
|
|