Giter Site home page Giter Site logo

olivierld / raspberry-coffee Goto Github PK

View Code? Open in Web Editor NEW
111.0 18.0 38.0 936.72 MB

JVM related (Java, Groovy, Scala, Kotlin, etc) samples for the Raspberry PI, relying on PI4J. IoT and friends.

Home Page: http://raspberrypi.lediouris.net/

C 1.18% Shell 2.96% JavaScript 36.46% HTML 6.59% Java 43.36% Batchfile 0.19% C++ 1.78% Processing 0.89% CSS 0.84% Scala 0.83% Groovy 0.11% Kotlin 0.25% Clojure 0.03% Python 3.41% XSLT 0.41% Go 0.06% Dockerfile 0.38% Makefile 0.01% Mathematica 0.02% PHP 0.25%
raspberry-pi java pi4j electronic-components jvm jvm-languages gradle

raspberry-coffee's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raspberry-coffee's Issues

Bug in BMP180 readS16()

Hi Olivier,

Firstly, thanks for sharing! I took a copy of your BMP180.java and adapted it for the BME280 by taking logic from Adafruit's bme280.py. This device includes a humidity sensor and appears to be little-endian.
When readS16() forms a little-endian result it reads the hi byte as unsigned and the lo byte as signed whereas it should be the other way around. This bug doesn't affect the BMP180 as that device is presumably big-endian.

BTW I also have a BMP180 and your code works as-is with this device.

ttfn,
Aidan.

Text Console

Hi could you please share more details about how it's working the text console and how is hardware linke to raspberry?
Thanks
Paolo

Exception with battery monitor

Thanks for providing this. I also have a boat and solar panel. I'm also using a Witty Pi, USB router and modem to schedule and send back pictures and GPS details. Trying to implement the battery monitor too and seeing the following Exception after initial reading:

pi@raspberrypi:~/raspberry-pi4j-samples $ sudo ./gradlew [--daemon] build

FAILURE: Build failed with an exception.

  • What went wrong:
    Task 'C' is ambiguous in root project 'raspberry-pi4j-samples'. Candidates are: 'check', 'chordFinder', 'classes', 'clean', 'clojureRepl', 'clojureTest', 'clojuredoc', 'combineJs', 'compileClojure', 'compileGroovy', 'compileJava', 'compileKotlin', 'compileScala', 'compileTestGroovy', 'compileTestJava', 'compileTestKotlin', 'compileTestScala', 'components', 'copyResources'.

  • Try:
    Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 10s
pi@raspberrypi:~/raspberry-pi4j-samples $

pi@raspberrypi:~/raspberry-pi4j-samples/ADC $ ./battery.monitor -min=289:3.75 -max=872:11.75 -debug=y
Read an ADC
Parameters are:
-calibration or -cal
-debug=y|n|yes|no|true|false - example -debug=y (default is n)
-ch=[0-7] - example -ch=0 (default is 0)
-min=minADC:minVolt - example -min=280:3.75 (default is 0:0.0)
-max=maxADC:maxVolt - example -min=879:11.25 (default is 1023:15.0)
-tune=ADC:volt - example -tune=973:12.6 (default is 1023:15.0)
-scale=y|n - example -scale=y (default is n)
-log=[log-file-name] - example -log=[batt.csv] (default is battery.log)

-min & -max are required if -tune is not here, and vice versa.
Prms: ADC Channel:0, MinADC:289, MinVolt:3.75, MaxADC:872, maxVolt:11.75
Volt [3.75, 11.75]
ADC [289, 872]
a=0.013227414, b=0.21569468
Value range: ADC=0 => V=0.21569468, ADC=1023 => V=13.747339
readAdc:858 (0x35A, 0&1101011010) Volume:83% (858) Volt:11.56
Exception in thread "main" java.lang.NullPointerException
at adc.sample.BatteryMonitor$1.valueUpdated(BatteryMonitor.java:145)
at adc.ADCContext.fireValueChanged(ADCContext.java:39)
at adc.ADCObserver.start(ADCObserver.java:121)
at adc.ADCObserver.start(ADCObserver.java:85)
at adc.sample.BatteryMonitor.(BatteryMonitor.java:154)
at adc.sample.BatteryMonitor.(BatteryMonitor.java:89)
at adc.sample.BatteryMonitor.main(BatteryMonitor.java:264)

Shutting down
Closing log file

Not sure if you can advise?

Thanks, Doug

GPL-compatible?

Can I use your code in an Open Source Project under the GPLv3 license? I couldn't find any licensing information in your repository.

Error in curves

In RESTTideServer, in some cases I still need to identify (specially when switching between stations on different time zones), you need to hit Draw Curve twice to get to the right data.

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.