Page 1 of 1

Bricx CC help

Posted: 24 Nov 2011, 08:57
by chimpfunkz
Hi,

I'm a high school student who is currently trying to restart our robotics club, raise club funds to buy some (better) robotics components, and learn programming at the same time. Its tough. But enough about me. I was wondering if someone could post the basics of programming Tetrix motors with Bricx CC here. What we'd have would probably be just 2 normal DC motors, so if someone could explain the basics of Tetrix-BricxCC programming as well as a sample code for moving each motor (forward, back, how to set power of motor, ,ect.) it would be really helpful. Thanks in advance to anyone who helps, or even takes the time to read this :D

Re: Bricx CC help

Posted: 24 Nov 2011, 13:21
by mattallen37
BCC does not support Tetrix controllers, so I wrote my own library. See this blog post for the library and an example.

Re: Bricx CC help

Posted: 25 Nov 2011, 04:06
by chimpfunkz
This is exactly what I needed. However, I am new with Bricx CC, so how would I go around implementing this?

Re: Bricx CC help

Posted: 25 Nov 2011, 14:51
by mattallen37
Look at the provided example program.

You need to save the library file as "MyTetrix lib.nxc", in the same directory as you save the program that needs it.

In the program, you include (#include "MyTetrix lib.nxc") the library so you can take advantage of the functions (like I did in the example).