
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
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 0 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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.