
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
motor-l298n
Advanced tools
Control an l298n motor from the Raspberry Pi.
The package can be installed using npm
.
$ npm install motor-l298n
The class controls two motors connected to an L298N. The motors are known as LEFT and RIGHT.
We create an instance of an l298n with:
module.setup(in1Pin, in2Pin, enable1Pin, in3Pin, in4Pin, enable2Pin);
It has a number of core capabilities that are motor related. First we have the notion of the rotation speed. This is measured in a percentage of maximum speed:
l298n.setSpeed(side, 60);
Setting the speed doesn't actually cause the motor to turn. We would then call one of the direction functions which are:
l298n.forward(side);
and
l298n.backward(side);
Calling either of these starts the motor turning at the currently set speed. If we change the speed while the motor is rotating, it will change the rate of rotation.
If we wish to stop a motor from turning, we can call:
l298n.stop(side);
In summary, the methods are:
Method | Description |
---|---|
setup(in1, in2, enable1, in3, in4, enable2) | Setup the L298N |
setSpeed(side, speed) | Set the speed of rotation |
forward(side) | Start rotating forwards |
backward(side) | Start rotating backwards |
stop(side) | Stop rotating |
This package depends upon:
FAQs
Module to control an l298n motor controller on a Pi
We found that motor-l298n 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.