Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raijin-Robot

Serial Communication API Frontend for Bittle Robot

prerequisites

  • Node.js
  • npm
  • serialport

install serialport

npm install serialport

basic connection guide

read bittle data from the serial port

const SerialPort = require('serialport').SerialPort;
const comPortB = new SerialPort({
	path: '/dev/cu.usbmodem56D00039821',
	baudRate: 115200,
	dataBits: 8,
	stopBits: 1,
	parity: 'none',
});

comPortB.on('open', function () {
	console.log('Serial Port connected');
	comPortB.on('data', function (data) {
		console.log('>:^.^:>\n' + data);
	});
});

once connected write a move to the serial port

write async functions to control the robot
add k to the beginning of the bittle move
and a wait time to the end of the move

async up() {
	setTimeout(() => {
		this.comPortB.write('kup');
	}, 3000);
}
up();

About

Serial Communication API Frontend for Bittle Robot. API development, and frontend development in robotics for Bittle Robot in JavaScript.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages