Not sure how to implement I2C interface although it looks very close to being possible. Nice shiny port on the controller and I2C motor encoders coming real soon but there doesn't appear to be any support for I2C sensors.

Downloaded 3.06 for a quick look but reverted back to 3.05 after issues with firmware loading.

Have seen some serial compasses on the WWW that may be an option and have some old Wiltronics DAC compasses that will work but only have a 16 point resolution - strictly a last resort.

This is for a high school class so bit banging a custom I2C solution is probably a step too far.

Has anyone got a suggestion?

_________________neilg

Thu Feb 16, 2012 9:41 am

Dick Swan

Creator

Joined: Fri Feb 09, 2007 9:21 amPosts: 615

Re: Compass for Cortex

There's no immediate answer that i can think of. 3.06 introduced I2C support for the new integrated motor encoders for the 269 and 393 motors.But it did not make I2C accessible for other sensor types -- this is tentatively planned for availability this summer.

If you can find a compass with a serial / UART interface then you've got a possible answer. Existing ROBOTC allows you to do whatever you want in terms of sending and receiving characters over the two UART links.

There are examples in ROBOTC for parsing the serial output stream from a GPS device. I can't recall whether this includes compass heading. If so, get a GPS module with serial stream (see www.sparkfun.com) and "you're done". Otherwise look for a compass that outputs a serial stream.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum