
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Communicate with Cubelets using node.js
Cubelets are magnetic blocks that can be snapped together to make an endless variety of robots. You can communicate with and program them in node.js with a Bluetooth Cubelet.
First, pair your Bluetooth Cubelet to OS X, Windows, or Linux. A serial connection will be used to communicate with the Cubelet using node-serialport.
To find the name of the device on OS X and Linux:
> ls /dev | grep Cubelet
cu.Cubelet-MOD
tty.Cubelet-MOD
On Windows, go to the Properties of the device in the Device Manager, and find the COM port for the Cubelet. The name will be something like "COM3", "COM42", etc.
Then, open a connection:
var cubelets = require('cubelets')
var device = {
path: '/dev/cu.Cubelet-GPW-AMP-SPP'
}
var client = cubelets.connect(device, function (err) {
console.log('connected to', device)
})
Once connected, you can discover other Cubelets connected to the Bluetooth Cubelet.
// Listen for incremental updates to the graph,
// as data becomes available.
client.on('updateBlockMap', function () {
console.log('Origin block', client.getOriginBlock())
console.log('Neighbor blocks', client.getNeighborBlocks())
console.log('All blocks (except origin)', client.getAllBlocks())
console.log('By ID', client.findBlockById(1234))
console.log('By hop count', client.filterBlocksByHopCount(2))
console.log('Graph', client.getGraph())
})
// Fetch the graph. Callback is fired once entire
// graph has been retrieved.
client.fetchGraph(function (err, graph) {
console.log('Nodes:', graph.nodes)
console.log('Edges:', graph.links)
})
FAQs
A package for interacting with Cubelets.
The npm package cubelets receives a total of 6 weekly downloads. As such, cubelets popularity was classified as not popular.
We found that cubelets demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.