Posts Tagged ‘Programming’

FRC – Week 2!

Posted by Erin, the RobotGrrl on Saturday, January 22nd, 2011

FRC stands for the FIRST Robotics Competition, and it is a robot competition for high school students to compete in. They have 6 weeks to model, design, build, program, wire, and media-ify and business-ify the robot! Afterwards, they go and compete in a regional competition! I am currently mentoring a Montreal high school team in programming- teaching them Java for the first time! Here were my thoughts about week 2!

During the week the students at the other school had their first experience with programming through Processing. Processing is a Java environment used to create interactive art projects. Since they all are “Photoshop gurus” already, this would be a fantastic way to introduce programming to them. We created a “sketch” where an ellipse was drawn. We then were able to move the ellipse around, and in the process learned about integers, operators, and the coordinate system.

This knowledge solidified some students to join the programming team for the big meeting on Saturday. We began by detailing the things we wanted to do today, and what goals we will need to achieve in the following weeks.

For this Saturday, we wanted to…
- Read from the encoders
- Analyze the default line sensing code, and try the line sensor
- Set up the wireless on the robot

We were able to achieve most of these, and learn even more about WPIlibJ in the process.

The lead veteran programmer of the team describes Java as a bittersweet change from LabView. Although Java is used more in real world computer science scenarios (client programs, university courses, Android apps), its vision processing is not as accessible as LabView. On top of that, there is the learning curve with learning a completely new way of writing, organizing, and displaying algorithms.

The three programmers got set up with the Netbeans distribution and the proper nbm files. We then dove head first into the code, and started with a simple program that would read an encoder, and display it on the screen. Once that worked, we added on to that and made the motor move.

Afterwards, we added a tick-tock algorithm that introduced the modulus operator to the programmers. This was designed to change the motor direction every five seconds. The three programmers grasped this algorithm and understood it fully after explanation.

A little bit of a design oversight, the cRio is such a fast processor, that it became stuck in the tick-tock quite often, as we were rounding the time from a double to an integer, and comparing it to a value of 5 seconds. Had this have been in milliseconds, there would not have been a problem. The veteran programmer suggested a “first pass” check, which fixed the problem.

After the lunch break, the veteran programmer was also able to make the camera display on the driver station, and control the servos with a joystick.

During that time, the other programmers took some time to play with Processing a bit more. They were able to setup the basic sketch template, and added text drawn to the screen with a customized font. We explored the nature of for loops by drawing the text multiple times inside of the loop. This was a great demonstration of iteration in action.

We almost had time to play with the light sensors, but the connections took quite a bit of time.

Nearing the end of the day, we were trying to get the wireless set up, the last item on our todo list. Although Chief Delphi was down for the entire time, we were somehow able to figure it out despite the number of road blocks. Hooray for wireless programming!

It was then time to head back home. We departed from week 2 feeling pretty confident about the capabilities that Java will provide us. Next week, our goals are to get some driving working (PID control, maybe), and also get the line sensors to work. Go programming team!


Are you mentoring any FIRST robotics teams? Are you a programming mentor too? What have you run into so far? Leave a comment below! :D

Posted in: FIRST.

Particles in Processing

Posted by Erin, the RobotGrrl on Wednesday, November 5th, 2008

I finally finished off the “Define Dancing” Processing artwork that I started a long time ago! :) The reason why I didn’t finish it back then was because the colours were messed up. I figured them out, and while playing with the colours, I created another program called Particle Finger Painting :d

Here’s the Define Dancing one…

::: [LIVE] ::: [CODE] :::

You can move your mouse around, and one particles will stay with it. All of the other particles are attracted to it, but some are stronger than the others. Plus, there’s forces between all of the particles too – some of them are negative, which results in “fireworks”-like collisions :D

Here’s the Particle Finger Painting one-

::: [LIVE] ::: [CODE] :::

I really like this one… it’s the same as the Define Dancing one, but the layering and transperency of the ellipses are different.

They both use the traer physics library for the particles. =)

Try the live ones out- they’re probably laggy since it’s in a browser. In that case, you should download Processing and try them out. It’s a good IDE to have anyway! :)

Posted in: Animation, Art, Programming, Projects.

Where Am I?

Posted by Erin, the RobotGrrl on Monday, April 21st, 2008

Why were there no blog posts for a week? EEEEEK!

I was studying….working…programming! ^^

I’ll skip the terribly boring stuff and get to the point(s)
- Tuesday, Wednesday, Thursday – track practice
- Spent Friday in Ottawa ^^
- Half of Saturday I soldered stuff
- Sunday I programmed in a GUI & went biking in mud with a friend
- Monday I am watching the Habs :D Homework I’ll do after :D

There was an extremely good day at school last week… we get to make a Rube Goldberg machine for Physics!! This is SO cool it’s unbelievable to have this opportunity. I’m still in awe, and verrry excited to start working with the wood with our team! Sure… our team may go overboard for a simple simple machine combination contraption … but when will the chance of building a Rube Goldberg machine come around again? ;P

What I am working on now is getting my LCD to display a custom screen that I drew out on paper. What the problem appears to be is that it can’t handle many characters… I have 3 custom characters… I FINALLY got the 3rd line to work, so now I have to figure out the 4th line. It’s really annoying. I’ll figure out, somehow, how to cut down the amount of info/characters that has to be displayed.

Additionally, I’m working on making a SQLite database interface for conversation links and language models. Once I get it working, I’ll be linking it up with Robbie. :) You can then imagine all the possibilities with regards to the different language models that will be downloadable! I’m thinking a gigantor mental math mini-game one… ;)

My fingers on my right hand are insane… thumb- raw’ish from soldering. index- has something wrong with it as I can’t lift it middle- a chunk of skin is missing because I unplugged my magsafe the wrong way… ring- my grad ring is ALWAYS falling off pinky- sprained a bit, from … I have no clue o_o

That’s all for now. I like how next year’s FIRST robotics is going to be completely different, with the new WPI programmer software and all! 802.11n will be great for ANNs too. I hope I am lucky enough to take part in FIRST next year! :D

Posted in: Other, Projects.

Robbie is Better than Ever!

Posted by Erin, the RobotGrrl on Sunday, March 9th, 2008

Woooohoooooo!

^_^ So, the whole purpose of the 20-inch display being lent to me was to display a bigger Robbie. Check out the pics, he looks AWESOME! I just want to poke his chubby-wubby cheeks ^___^. Frankenteddy: Erin, Robbie doesn’t have chubby cheeks. Erin: Shhhh! x]]

Big Robbie (5)! Big Robbie (4)! Big Robbie (3)! Big Robbie (2)! Big Robbie (1)!

I ran into some roadblocks today *coughtyposcough*, but thanks to scott he helped point them out to me! (THANKS!!!)

It all seems reasonably accomplishable now! I have to add in more levels to the conversation though, but I’ll probably put the app up for download tomorrow morning, after I make the survey form.

7 sleeps till science fair!

Posted in: Programming, Projects, Robot.

Arduino LED Testing

Posted by Erin, the RobotGrrl on Saturday, November 3rd, 2007

I received my Arduino starter kit from ladyada.com not too long ago – Oct. 30th to be exact – It’s AWESOME! :) I really think this will work well. Check out the pics and video below!

This is the Arduino Deicemilia board – the main thing.

The Arduino hooked up with a servo – I was testing it. :) Works well!

This is the protosheild. It sheilds the Arduino for you, this way nothing should happen to it! :) It is also easier to create circuits with. I spent an hour or so today soldering it all together ^_^ (I learned how to solder, YAY!)

And now for the test video!


Hope you like! :)

As for the programming of the project, it is not going too well. I will have to devise a new plan ASAP. I believe I have to submit the project near the end of December… YIKES! However, I am sure I will get it done!

I have registered for MIT ESP’s Splash 2007, mainly in Computer Science classes. It’s going to be the best weekend EVERR! I really can’t wait. Hopefully they can help out once I tell them about the project.

Adios amigos!

Posted in: Programming, Projects, Robot.