Bricx CC help

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
chimpfunkz
Posts: 2
Joined: 24 Nov 2011, 08:52

Bricx CC help

Post 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
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Bricx CC help

Post by mattallen37 »

BCC does not support Tetrix controllers, so I wrote my own library. See this blog post for the library and an example.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
chimpfunkz
Posts: 2
Joined: 24 Nov 2011, 08:52

Re: Bricx CC help

Post by chimpfunkz »

This is exactly what I needed. However, I am new with Bricx CC, so how would I go around implementing this?
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Bricx CC help

Post 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).
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 9 guests