Skip to content

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

License

Notifications You must be signed in to change notification settings

lucianoscarpaci/Raijin-Inu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published