View Single Post
  #24   Spotlight this post!  
Unread 17-04-2015, 20:24
michaelwm's Avatar
michaelwm michaelwm is offline
Integrated Systems Lead
AKA: Michael Midura
FRC #4976 (Rebel Robotics)
Team Role: Programmer
 
Join Date: Dec 2013
Rookie Year: 2010
Location: Georgetown
Posts: 23
michaelwm is a jewel in the roughmichaelwm is a jewel in the roughmichaelwm is a jewel in the roughmichaelwm is a jewel in the rough
Re: Javascript Robots!

Quote:
Originally Posted by bthlx View Post
Hi all, I just saw this thread and got super excited.
I've been wanting a JS alternative since I started doing FRC 3 years ago.
I was thinking it'd be fairly straightforward to implement RobotJS as a node add-on, but going with the v8 engine directly may be better. I was thinking it would be nice to use the built nide modules like fs if necessary so that was my attraction to the add-on route.
As far as syntax, couldn't you do something like:

var wpilib = require('wpilib');

var robot = new wpilib.IterativeRobot();

...

robot.liftMotor=new wpilib.Talon(1);

which is a very nodejs idiom.

Thoughts?
There are 2 way's to go about this problem, a solution similar to Node, and a solution similar to DOM. Whichever way you choose, it shouldn't matter at all performance wise. We chose DOM, because the majority of new programmers are very familiar with DOM. If your programming team is more familiar with Node / classic programming markup, then your method is definitely better.

The great thing about using v8 directly instead of Node is that you get to choose your syntax and the way your programming team scripts it's robot. Go nuts!
__________________
Integrated Systems