This library allows you to program autonomous flight for the COEX Clover quadcopter in JavaScript language and you can perform almost all the tasks described in the Clover's documentation with alternative commands in the JS.
The amount of code written in JS with my library for the most common tasks is significantly less compared to the amount of code in Python written for the same task
1.1 Download this repository to Clover's RaspberryPI, unzip and open folder CloverJS, then open console
const clover = require('./clover');
//Ascending to the altitude of 1.5 m with the climb rate of 0.5 m/s:
clover.navigate(x=0.0, y=0.0, z=1.5, yaw=0.0, yaw_rate=0.0, speed=0.5, frame_id='body', auto_arm=true);
//Also you can write like this:
clover.navigate(0, 0, 1.5, 0, 0, 0.5, 'body', true);
clover.sleep(2); //2 seconds
clover.led(effect = 'fill', r = 255, g = 0, b = 0) //or clover.led('fill', 255); - fill strip with red color
//Rainbow effect:
clover.led(effect = 'rainbow'); //or clover.led('rainbow');
clover.get_telemetry();
console.log(clover.telemetry());
clover.get_range();
console.log(clover.range());
clover.get_qr();
console.log(clover.qr());
clover.get_color();
console.log(clover.color());
clover.navigate_global(lat=55.707033, lon=37.725010, z=0, speed=5, frame_id='body'); //navigate to some coordinates
clover.land();