|
Page 1 of 1
|
[ 9 posts ] |
|
| Author |
Message |
|
kyro1214
Rookie
Joined: Sat Oct 13, 2012 6:00 pm Posts: 5
|
 Programming with sensors
i was wondering if it is possible to use non-vex sensors to program with the the cortex microcontroller
|
| Sat Oct 13, 2012 6:02 pm |
|
 |
|
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 495
|
 Re: Programming with sensors
Yes, it is possible to program for some non-VEX sensors. For analog sensors, you can configure the port as a potentiometer or light sensor. For simple digital sensors, a digital in can be used. For more advanced sensors that require communication, you might be able to use UART,I2C, or, if neither of those work, bit bang things out using digital in and out What sensors were you thinking about using in particular? Perhaps someone here can help you out.
_________________ sudo rm -rf /
|
| Sat Oct 13, 2012 6:14 pm |
|
 |
|
kyro1214
Rookie
Joined: Sat Oct 13, 2012 6:00 pm Posts: 5
|
 Re: Programming with sensors
thank you for the response, i was thinking of using the vex optical shaft encoder but there are some concerns with the autonomy with it. if the robot collide with another robot or object the sensor will lose its position and it wouldnt get accurate data. right now im looking at other sensors that could help me with the navigation during the autonomy section
|
| Sat Oct 13, 2012 8:04 pm |
|
 |
|
JohnWatson
Site Admin
Joined: Thu May 24, 2012 12:15 pm Posts: 388
|
 Re: Programming with sensors
If you are planning to use these components in a competition, I would take another look at the VEX Sack Attack Manual ( found here), specifically sections <R5> to <R7>: There may be exceptions to this, though, and I would suggest posting your question (with the specific parts you plan to use) in VEX's Q&A section for an official answer, as it is the only way to know for sure if a part is legal or not.
_________________Check out our Blog! And our Facebook page! Need help? Take a look at our Wiki and our Forums.I just met you, And this is crazy, But here's my code now, So fix it, maybe? ~ Carly Rae Jepsen parody
|
| Mon Oct 15, 2012 4:37 pm |
|
 |
|
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 495
|
 Re: Programming with sensors
Yep, you can't use your own sensors in the competition unless you're in the college division.
_________________ sudo rm -rf /
|
| Mon Oct 15, 2012 5:35 pm |
|
 |
|
kyro1214
Rookie
Joined: Sat Oct 13, 2012 6:00 pm Posts: 5
|
 Re: Programming with sensors
i am in the college division. is there a way to program the ultrasonic sensor to only detect the signal that you emitted? if the opposition is also using an ultrasonic sensor, wouldnt it affects the the unwanted signals.
|
| Tue Oct 30, 2012 10:54 pm |
|
 |
|
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 495
|
 Re: Programming with sensors
If your rangefinder is operating on the same frequency as that of the opposition's, then yes, the signals can interfere with each other. While there are ultrasoinics that operate at different frequencies, most on the market use 40 kHz. Unfortunately, I don't think that there is any easy way (past the calibration that is already done in the sensor) to differentiate between the echo from your ping, and the ping of another sensor *. What you can do however, is write a filter to weed out the erroneous values. It can be as simple as a low pass filter, or you can work up to something like a kalman filter. Take a look at the Wikipedia page on digital filters to lean more: http://en.wikipedia.org/wiki/Digital_filter*It's possible to build your own sensor, and modulate a unique output signal over the ping, but that's probably a lot more trouble than it's worth. It would certainly be an interesting project though, and the necessary parts are available online if you with to try.
_________________ sudo rm -rf /
|
| Fri Nov 02, 2012 11:22 pm |
|
 |
|
kyro1214
Rookie
Joined: Sat Oct 13, 2012 6:00 pm Posts: 5
|
 Re: Programming with sensors
are there any sample code for the i2c port?
|
| Wed Nov 07, 2012 5:11 pm |
|
 |
|
Kevin Selavko
Rookie
Joined: Thu May 31, 2012 4:06 pm Posts: 13 Location: Pittsburgh, Pa
|
 Re: Programming with sensors
|
| Thu Nov 22, 2012 7:53 pm |
|
|
|
Page 1 of 1
|
[ 9 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 4 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
|
|