![]() |
Using Lejos to program an FTC style robot
My mentor has tasked me along with a few other students to build an FTC style robot (tetrix build kit with an NXT brain) to show off to students in the area for recruiting. We no longer have an FTC team but we think its something simple that will spark people's interests in robotics without having to lug our FRC bot around. The only problem is that we no longer have an active RobotC license and our mentor doesn't think its worth it to purchase one and wants us to think outside of the box and challenge ourselves. I have decided to use the Lejos NXJ library for Java because it seems to suit our purposes and I think it will be good practice for myself and some newer members for this upcoming season. It seems simple enough to write an autonomous program but I was wondering if anybody could give me some help with writing a program for driver control using a joystick controller (Logitech F310 Gamepad) through bluetooth. Any help would be greatly appreciated even if its just about using Lejos in general and other helpful tips.
TL;DR: I need help to write a Lejos NXJ program using a joystick controller through bluetooth. |
Re: Using Lejos to program an FTC style robot
I did some Bluetooth control with LeJos and Lego robots I will try and dig up my code for you.
|
Re: Using Lejos to program an FTC style robot
I know that there's a lot of sample material you can essentially cut and paste on with the Bluetooth connections (as it can be somewhat code intensive but fairly redundant). For the joystick you could use a library like Jinput.
Here's some simple code I rooted up from like 2 years ago. This was just an experiment to see how the Bluetooth worked. It allowed me to drive my robot with the WASD keys. There is both computer (client) and robot (server) side code here: ShooterClient.java Code:
package control.client.shooterBot;Code:
package control.server.shooterBot;Code:
package control.server.shooterBot; |
Re: Using Lejos to program an FTC style robot
Thanks. This is really helpful. If anyone has any experience with JInput, tips for that would be helpful too. I considered using it but I didn't know if there was any better option. I don't have much experience using it but I think I can figure it out.
|
Re: Using Lejos to program an FTC style robot
I'm glad this is helpful! I'm really glad I found these files. They were in some obscure location on my computer. XD
|
Re: Using Lejos to program an FTC style robot
I suppose I could just Google it, but what is a Lejo?
|
Re: Using Lejos to program an FTC style robot
Quote:
|
Re: Using Lejos to program an FTC style robot
leJOS stands for Lego Java Operating System
|
| All times are GMT -5. The time now is 10:42. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi