GithubHelp home page GithubHelp logo

instantiations / pigpio-vast Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 1.0 475 KB

Pigpio binding library for VA Smalltalk

License: MIT License

Smalltalk 100.00%
smalltalk vasmalltalk vastplatform pigpio raspberry-pi gpio-library

pigpio-vast's Introduction

Pigpio wrapper for VAST Platform (VA Smalltalk)

This is a Smalltalk wrapper of the C library pigpio to manage the GPIO pins of a Raspberry Pi
Explore the docs »

Report a defect | Request feature

This project is designed for anyone wanting to access GPIOs of a Raspberry Pi and starting with IoT. The library provides not just pulling up and down pins but also many of the most important protocols such as 1-Wire, I2C, SPI, etc.

License

  • The code is licensed under MIT.
  • The documentation is licensed under CC BY-SA 4.0.

Installation

  1. Install VA Smalltalk 11.0.1 or newer.
  2. Install Tonel support in your development image following this guide.
  3. Clone this repository.
  4. The easiest and recommended approach is to install it via a script:
| loader path |
path := (CfsPath named: '<insert path to root pigpio-vast local repo here>').
loader := TonelLoader readFromPath: path.
loader
	beUnattended; "do not prompt and use all defaults"
	useGitVersion.
loader loadAllMapsWithRequiredMaps.

Or you can load the Configuration Map RaspberryHardwareInterfaceCore from the context menu of the Configuration Maps Browser: "Import" -> "Load Configuration Maps from Tonel repository..." -> select path to root pigpio-vast local repo. This will open a dialog and will use convenient defaults for the load. Refer to its documentation for more details.

  1. Optionally run the SUnit tests included in the map RaspberryHardwareInterfaceTest to ensure correct installation. One easy way is to right-click on the RaspberryHardwareInterfaceTest map name in the Name pane (as opposed to version pane ) and then select Test Loaded Applications.

Quick Start

Acknowledgments

Contributing

Check the Contribution Guidelines

pigpio-vast's People

Contributors

emaringolo avatar greg-schultz avatar marianopeck avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

emaringolo

pigpio-vast's Issues

Rename all Gpio to Pigpio

In many places of the RaspberryHardware core refers to the word GPIO instead of Pigpiod. Examples is the classes RaspberryGpioDaemonInterface and RaspberryGpioInterface. In that case the "Gpio" is not really GPIO as the phisical pin (hardware) but the LIBRARY. Therefore, that must be Pigpio.

There are probably other places than these 2 class names where it calls "Gpio" instead of "Pigpiod". We should try to rename as much as we can see.

Make GPIOPortMCP23017 more general and support native GPIOs

Right now, GPIOPortMCP23017 works with a device. The API of that device is basically a subset of I2CDeviceGPIOMCP23017. I believe that subset of functionality / API should eventually be moved up in the hierarchy (to I2cDevice or GpioBusDevice). That way, GPIOPortMCP23017 could be renamed to GPIOPort and depending on which device you pass, it would use either the GPIOs of MCP23017 or the native ones.

At this point, it would also be interesting to think if those GpioBusDevice and similar GPIO* classes should be renamed to Pigpio*.

Better document that we cannot use RaspberryGpioInterface but RaspberryGpioDaemonInterface

We should explain better that in VAST, we can only use RaspberryGpioDaemonInterface so far and that RaspberryGpioInterface crashes the VM. We should put that as class comments or even rename RaspberryGpioInterface to RaspberryGpioInterfaceBROKEN or move it to a separate subclass or something. In addition, we can implement RaspberryGpioInterface class >> raspberryGpioStart doing a self error: 'not supported... use daemon instead....

OneWireDS18B20ThermometerDevice>temperature problem

OneWireDS18B20ThermometerDevice>temperature fails to close the file after reading it. See new code below.

temperature
"Answer the current temperature value of this device. It is possible the device may not have reported a correct list
of data, so return 999 as a placeholder"
| file data pos tStr |

file := CfsReadFileStream open: devFilePath.
file isCfsError ifFalse: [
	data := file contents.
            file close.                                    "This is the new line."
	((data indexOfSubCollection: 'YES') > 0) ifTrue: [
		pos := data indexOfSubCollection: 't='.
		(pos > 0) ifTrue: [
			tStr := data copyFrom: pos + 2 to: data size.
			^tStr asNumber / 1000.0.
		].
	].
].
^999.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.