packages feed

paprika 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+93/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

+ README.md view
@@ -0,0 +1,51 @@+# The Haskell library and examples for the kids programming robot paprika.++This package provides the Haskell library and examples for the kids programming robot paprika.+It provides features such as the following:++* The Haskell library for controlling paprika on Intel Edison.++* The console controller application for paprika.++* The web controller application for paprika.+++# Prerequisites++Currentry this library was tested only for Intel Edison++* [Intel Edison](https://en.wikipedia.org/wiki/Intel_Edison)++* [stack](https://docs.haskellstack.org) installed on Intel Edison++* [paprika](http://pcn.club/paprika/)++* [Voltage Translator](https://www.fairchildsemi.com/products/logic/voltage-level-translators/voltage-level-translators/FXMA108.html), [available from akizuki](http://akizukidenshi.com/catalog/g/gM-04522/)+++# Usage++## Preparation++$ sh/setup_paprika.sh+++## Instant Run++$ stack runhaskell app/ConsoleCtrl.hs++$ stack runhaskell app/WaiCtrl.hs 0.0.0.0 9999+++## Build And Install Run++$ stack install++$ ~/.local/bin/paprikax-console-ctrl-exe++$ ~/.local/bin/paprika-wai-ctrl-exe 0.0.0.0 9999+++# Authors++This library was written by Takamasa Mitsuji.
paprika.cabal view
@@ -1,5 +1,5 @@ name:                paprika-version:             0.1.0.1+version:             0.1.0.2 synopsis:            The Haskell library and examples for the kids programming robot paprika description:         Please see README.md homepage:            https://github.com/mitsuji/paprika#readme@@ -12,6 +12,7 @@ build-type:          Simple cabal-version:       >=1.10 extra-source-files:+  README.md   static/ctrl/default.htm   static/ctrl/default.js   static/ctrl/default.css@@ -24,7 +25,8 @@   static/cutter/reporter.js   static/cutter/qr.htm   static/cutter/qr.js-  +  sh/setup_paprika.sh+ library   hs-source-dirs:      src   exposed-modules:     System.Paprika
+ sh/setup_paprika.sh view
@@ -0,0 +1,38 @@+#!/bin/sh++function setup_out() {+    sh -c "echo mode0 > /sys/kernel/debug/gpio_debug/gpio$1/current_pinmux"+    sh -c "echo $1    > /sys/class/gpio/export"+    sh -c "echo out   > /sys/class/gpio/gpio$1/direction"+    sh -c "chmod 666 /sys/class/gpio/gpio$1/value"+}++function setup_pwm() {+    sh -c "echo mode1 > /sys/kernel/debug/gpio_debug/gpio$3/current_pinmux"+    sh -c "echo $2    > /sys/class/pwm/pwmchip$1/export"+    sh -c "chmod 666 /sys/class/pwm/pwmchip$1/pwm$2/enable"+    sh -c "chmod 666 /sys/class/pwm/pwmchip$1/pwm$2/period"+    sh -c "chmod 666 /sys/class/pwm/pwmchip$1/pwm$2/duty_cycle"+    sh -c "echo 1 > /sys/class/pwm/pwmchip$1/pwm$2/enable"+}+++setup_pwm 0 1 13+setup_pwm 0 2 182++setup_out 78+setup_out 79+setup_out 80+setup_out 81+++#+# [J18-pin1 ] <==> [1.8V <=> 3.3V] <==> [out3]+# [J17-pin1 ] <==> [1.8V <=> 3.3V] <==> [out4]+# +# [J20-pin11] <==> [out6]+# [J20-pin12] <==> [out5]+# [J20-pin13] <==> [out1]+# [J20-pin14] <==> [out2]+#+#