All Projects → PowerShell → Powershell Iot

PowerShell / Powershell Iot

Licence: mit
Interact with I2C, SPI & GPIO devices using PowerShell Core!

Programming Languages

powershell
5483 projects

Projects that are alternatives of or similar to Powershell Iot

Nf Interpreter
⚙️ nanoFramework Interpreter, CLR, HAL, PAL and reference target boards
Stars: ✭ 168 (+58.49%)
Mutual labels:  spi, i2c, gpio
Gopi
Raspberry Pi Go Language Interface
Stars: ✭ 82 (-22.64%)
Mutual labels:  spi, i2c, gpio
Diozero
Java Device I/O library that is portable across Single Board Computers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
Stars: ✭ 167 (+57.55%)
Mutual labels:  spi, i2c, gpio
Periph
Go·Hardware·Lean
Stars: ✭ 1,700 (+1503.77%)
Mutual labels:  spi, i2c, gpio
Raspberrysharp
A .NET/Mono IO Library for Raspberry Pi This library is a complete refactoring of Raspberry-Sharp libraries, merged into one library and updated to RB3, CM3 and RB3+
Stars: ✭ 41 (-61.32%)
Mutual labels:  spi, i2c, gpio
Elixir ale
Interact with hardware in Elixir - GPIOs, I2C and SPI
Stars: ✭ 336 (+216.98%)
Mutual labels:  spi, i2c, gpio
Rppal
A Rust library that provides access to the Raspberry Pi's GPIO, I2C, PWM, SPI and UART peripherals.
Stars: ✭ 463 (+336.79%)
Mutual labels:  spi, i2c, gpio
Ofxgpio
Library C++ for raspberrypi and orangepi, GPIO interfaces compatible with openframeworks.
Stars: ✭ 155 (+46.23%)
Mutual labels:  spi, i2c, gpio
Tinygo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Stars: ✭ 9,068 (+8454.72%)
Mutual labels:  spi, i2c, gpio
awesome-embedded-swift
⚡️🛠🧰 A curated list for Embedded and Low-Level development in the Swift programming language.
Stars: ✭ 57 (-46.23%)
Mutual labels:  gpio, i2c, spi
Johnny Five
JavaScript Robotics and IoT programming framework, developed at Bocoup.
Stars: ✭ 12,498 (+11690.57%)
Mutual labels:  spi, i2c, gpio
Mraa
Linux Library for low speed IO Communication in C with bindings for C++, Python, Node.js & Java. Supports generic io platforms, as well as Intel Edison, Intel Joule, Raspberry Pi and many more.
Stars: ✭ 1,220 (+1050.94%)
Mutual labels:  spi, i2c, gpio
Drivers
TinyGo drivers for sensors and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
Stars: ✭ 250 (+135.85%)
Mutual labels:  spi, i2c, gpio
tinyfont
Text library for TinyGo displays
Stars: ✭ 37 (-65.09%)
Mutual labels:  gpio, i2c, spi
Swiftygpio
A Swift library for hardware projects on Linux/ARM boards with support for GPIOs/SPI/I2C/PWM/UART/1Wire.
Stars: ✭ 1,188 (+1020.75%)
Mutual labels:  spi, i2c, gpio
Raspberry-ssd1306
ssd1306 Command Line Tool for Raspberry Pi
Stars: ✭ 34 (-67.92%)
Mutual labels:  i2c, spi
pigpio-client
A nodejs client for pigpio socket interface.
Stars: ✭ 24 (-77.36%)
Mutual labels:  gpio, i2c
drivers-for-mcu
The driver for the microprocessor
Stars: ✭ 68 (-35.85%)
Mutual labels:  i2c, spi
NR1-UI
Userinterface for Volumio (RaspberryPi) with ssd1322 and ssd1306 oled display, spectrum bargraph, progress bar, LED functions, Standby-functions, 4 Buttons and Rotary Encoder.
Stars: ✭ 29 (-72.64%)
Mutual labels:  i2c, spi
Ssd1306
Driver for SSD1306, SSD1331, SSD1351, IL9163, ILI9341, ST7735, PCD8544, Nokia 5110 displays running on Arduino/ESP32/Linux (Rasperry) platforms
Stars: ✭ 303 (+185.85%)
Mutual labels:  spi, i2c

PowerShell-IoT

Build status Travis PowerShell Gallery

Note: PowerShell IoT is still in Preview

A PowerShell module for interacting with hardware sensors and devices using common protocols: GPIO, I2C & SPI.

An SSD1306 displaying "Hello World from PowerShell"

Information

Goals

The main goal of this project is to provide a friendly interface for interacting with hardware sensors and devices using PowerShell.

That said, it was built as close to the metal as possible to keep the library broad enough to cover a range of sensors and devices.

The hope is that this module will be the foundation for other modules that will expose specific cmdlets for interacting with specific sensors and devices.

For example, a cmdlet stack to turn on a light bulb might be:

> Set-Light On # Your user types this / you make this cmdlet
> Set-GpioPin -Id 4 -Value High # You use this to make that^ / we make this cmdlet
> # Our code that makes that^

To see some examples of modules built on top of PowerShell IoT, see the Examples folder.

Supported platforms

Supported devices

  • Raspberry Pi 3
  • Raspberry Pi 2

Supported operating systems

  • Raspbian Stretch

Documentation & Examples

Please see our docs folder here for an API reference, pin layout and other docs. For examples, checkout our examples folder.

Dependencies

This project relies on .NET Core IoT Libraries. It is a .NET library for interacting with Raspberry Pi's IO functionality.

Installation

PowerShell Gallery

You can grab the latest version of PowerShell IoT by running:

Install-Module Microsoft.PowerShell.IoT

Please note that since this module works with Hardware, higher privileges are required (run PowerShell with sudo, or as root user)

Then see the section on running.

If you want to write a module that uses PowerShell IoT, include it in the RequiredModules field of your module manifest.

GitHub releases

You can also manually download the zipped up module from the releases.

Then see the section on running.

AppVeyor

You can download the latest CI build from our AppVeyor build here. Go to the latest build, click on either of the images, then click on the artifacts tab. From there, you can download a zip of the latest CI build.

Then see the section on running.

From Source

Prerequisites

Building

NOTE: You can't build on ARM devices at this time so you will need to build on another machine and copy the build to the device.

  1. Clone/download the repo
  2. run ./build.ps1 -Bootstrap to see if you're missing any tooling
  3. run ./build.ps1 to build

At this point, you'll notice an out folder has been generated in the root of your repo. The project is ready to be deployed to your device.

Deploying

We have included a helper script, Move-PSIoTBuild.ps1, that will move the PowerShell IoT build over to your device. This copy uses PSRP over SSH so make sure you're able to connect to your pi this way. The Microsoft.PowerShell.IoT module will be copied to your $env:PSModulePath on your device. Here's an example:

Move-PSIoTBuild.ps1 -Ip 10.123.123.123 # IP address of device

You can also easily copy examples in the Examples folder over using the -WithExample flag. Just give a list of examples you want to copy over and it will move those to you $env:PSModulePath along with Microsoft.PowerShell.IoT:

Move-PSIoTBuild.ps1 -Ip 10.123.123.123 -WithExample Microsoft.PowerShell.IoT.Plant,Microsoft.PowerShell.IoT.SSD1306

Also, with the -Build parameter, it will build/test/package your project before moving it.

NOTE: If you'd rather not use the script, simply copy the out/Microsoft.PowerShell.IoT to your device to get started.

Running

Start PowerShell:

pwsh

If you have the Microsoft.PowerShell.IoT module in your PSModulePath:

Import-Module Microsoft.PowerShell.IoT

Alternatively, just import the .psd1:

Import-Module /path/to/Microsoft.PowerShell.IoT/Microsoft.PowerShell.IoT.psd1

At this point you can now mess with the module:

Get-Command -Module Microsoft.PowerShell.IoT
Get-GpioPin 2 # gets the data from GPIO pin 2

Testing

You can run tests, but they require a particular setup. Here is how you run them:

./build.ps1 -Test

The setup required:

We currently have a build agent that will deploy PR code onto a test Raspberry Pi and run the tests found in the test directory.

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].