All Projects → philipphenkel → pxt-powerfunctions

philipphenkel / pxt-powerfunctions

Licence: MIT license
MakeCode extension for controlling your LEGO Power Functions devices with an IR-emitting LED

Programming Languages

typescript
32286 projects
Makefile
30231 projects

Projects that are alternatives of or similar to pxt-powerfunctions

pxt-calliope
A Microsoft MakeCode editor for the Calliope Mini board
Stars: ✭ 33 (-25%)
Mutual labels:  microbit, makecode
pxt-neopixel
A Neo-Pixel package for pxt-microbit
Stars: ✭ 47 (+6.82%)
Mutual labels:  microbit, makecode
Pxt
Microsoft MakeCode (PXT - Programming eXperience Toolkit)
Stars: ✭ 1,649 (+3647.73%)
Mutual labels:  microbit, makecode
Mouse
Mouse Framework is an iOS and macOS post-exploitation framework that gives you a command line session with extra functionality between you and a target machine using only a simple Mouse payload. Mouse gives you the power and convenience of uploading and downloading files, tab completion, taking pictures, location tracking, shell command execution, escalating privileges, password retrieval, and much more.
Stars: ✭ 186 (+322.73%)
Mutual labels:  remote-control
Insanity Framework
Generate Payloads and Control Remote Machines. [Discontinued]
Stars: ✭ 189 (+329.55%)
Mutual labels:  remote-control
Flagsmith Api
Feature flagging and remote config service. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 223 (+406.82%)
Mutual labels:  remote-control
WiFi-remote-for-Bestway-Lay-Z-SPA
Hack - ESP8266 as WiFi remote control for Bestway Lay-Z spa Helsinki
Stars: ✭ 138 (+213.64%)
Mutual labels:  remote-control
Ws Scrcpy
Web client prototype for scrcpy.
Stars: ✭ 164 (+272.73%)
Mutual labels:  remote-control
winagent
Windows agent for Tactical RMM
Stars: ✭ 20 (-54.55%)
Mutual labels:  remote-control
Offline Ps4 Remote Play
Enjoy playing on your PS4 from your computer (WLAN/Ad-hoc) without the need of an Internet connection.
Stars: ✭ 215 (+388.64%)
Mutual labels:  remote-control
Transgui
🧲 A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.
Stars: ✭ 2,488 (+5554.55%)
Mutual labels:  remote-control
Injectioniii
Re-write of Injection for Xcode in (mostly) Swift
Stars: ✭ 2,680 (+5990.91%)
Mutual labels:  remote-control
Tacticalrmm
A remote monitoring & management tool, built with Django, Vue and Go.
Stars: ✭ 231 (+425%)
Mutual labels:  remote-control
Android Remote
Control Clementine from your Android device
Stars: ✭ 188 (+327.27%)
Mutual labels:  remote-control
BricklinkSharp
Easy-to-use C# client for the bricklink (LEGO) marketplace API.
Stars: ✭ 18 (-59.09%)
Mutual labels:  lego
Sanderling
APIs and libraries to read information directly from the EVE Online game client.
Stars: ✭ 169 (+284.09%)
Mutual labels:  remote-control
flagsmith
Open Source Feature Flagging and Remote Config Service. Host on-prem or use our hosted version at https://flagsmith.com/
Stars: ✭ 2,309 (+5147.73%)
Mutual labels:  remote-control
Daikin Control
Unofficial api documentation and web interface to control "Daikin Emura" air conditioner
Stars: ✭ 193 (+338.64%)
Mutual labels:  remote-control
Vanillarat
VanillaRat is an advanced remote administration tool completely coded in C# for Windows.
Stars: ✭ 192 (+336.36%)
Mutual labels:  remote-control
Syncit
a privacy-first co-browsing tool
Stars: ✭ 216 (+390.91%)
Mutual labels:  remote-control

Power Functions IR Sender

Build Status

Control your LEGO® Power Functions motors using your micro:bit or Calliope-Mini, an infrared LED and MakeCode. This extension turns your device into a remote control for your Power Functions devices.

A project using this extension is documented on hackster.io

Installation

Open MakeCode and select '+ Extensions' in the 'Advanced' menu. You need to enter our project URL https://github.com/philipphenkel/pxt-powerfunctions in the search field, hit return and then select the powerfunctions extension.

Documentation

powerfunctions.connectIrLed

Configures the infrared LED pin. A 940 nm emitting diode is required.

powerfunctions.connectIrLed(AnalogPin.P0)

Parameters

  • pin - analog pin with an attached IR-emitting LED

powerfunctions.setSpeed

Sets the speed of a motor.

powerfunctions.setSpeed(PowerFunctionsMotor.Red1, 3)

Parameters

  • motor - the motor
  • speed - the speed of the motor from -7 to 7.

powerfunctions.brake

Brakes then float. The motor's power is quickly reversed and thus the motor will stop abruptly.

powerfunctions.brake(PowerFunctionsMotor.Red1)

Parameters

  • motor - the motor

powerfunctions.float

Floats a motor to stop. The motor's power is switched off and thus the motor will roll to a stop.

powerfunctions.float(PowerFunctionsMotor.Red1)

Parameters

  • motor - the motor

powerfunctions.setMotorDirection

Configures a motor direction.

powerfunctions.setMotorDirection(PowerFunctionsMotor.Red1, PowerFunctionsDirection.Right)

Parameters

  • motor - the motor
  • direction - the direction of the motor

MakeCode Example

basic.showIcon(IconNames.Heart);
powerfunctions.connectIrLed(AnalogPin.P1);

powerfunctions.setMotorDirection(
  PowerFunctionsMotor.Blue1,
  PowerFunctionsDirection.Backward
);

input.onButtonPressed(Button.A, () => {
  powerfunctions.setSpeed(PowerFunctionsMotor.Blue1, 3);
});

input.onButtonPressed(Button.B, () => {
  powerfunctions.float(PowerFunctionsMotor.Blue1);
});

basic.forever(() => {
  led.plotBarGraph(input.lightLevel(), 255);

  if (input.lightLevel() > 200) {
    powerfunctions.float(PowerFunctionsMotor.Blue1);
    basic.pause(5000);
    powerfunctions.setSpeed(PowerFunctionsMotor.Blue1, 2);
    basic.pause(3000);
  }
});

Disclaimer

LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this project.

License

Copyright (C) 2017-2020 Philipp Henkel

Licensed under the MIT License (MIT). See LICENSE file for more details.

Supported targets

  • for PXT/microbit
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].