Programs Using NodeJs Modules

The following programs are examples that use the NodeJs modules, primarily to read data from a PIC chip via the usb port. The advantage of using NodeJs is that the programs are platform independent. One can use these programs in linux, windows or Mac operating systems to read data from the usb port.
To run the programs, one needs to download and install nodejs on your computer, and install the "serialport" module as well as the "readline-sync" module.

Nodejs Programs that input usb data from PIC microcontrollers
  1. test9600.js: This is a good program to test if your NodeJs setup is working properly. First, program a PIC690 with the assembly code sertest3.asm that sends consecutive numbers to the usb port. For instructions on how to program the PIC16F690 see pprogs.html. Then run test9600.js by typing "sudo node test9600.js" in a linux terminal.
  2. test115200.js: This program is similar to test9600.js except that the baud rate is 115200. You can test this out by programming the PIC690 with the new fast laser gate assembly code time3fastled.asm. The code can be run by typing "sudo node test115200.js" in a linux terminal.
  3. tandv.js: This is the Nodejs version of tandvf.c that is used in the new laser gate setup: lasergate2.html. Run tandv.js by typing "sudo node tandv.js" in a linux terminal. The program will produce a data file: data.txt to be read by graphdata.html for graphing and analysis.
  4. conacc.js: This is the Nodejs version of "conaccusbf.c" that is used in the new laser gate setup. Run conacc.js by typing "sudo node conacc.js" in a linux terminal. The program will produce a data file: data.txt to be read by graphdata.html for graphing and analysis.

Siegel's Home Page

Physics Department| College of Science