Giter Site home page Giter Site logo

pifacecad's People

Contributors

0xpr0xy avatar jrmhaig avatar monomon avatar tompreston avatar trickiedick avatar

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

Watchers

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

pifacecad's Issues

No PiFace Control and Display board detected (hardware_addr=0, bus=0, chip_select=1) since kernel 4.9.51

Hi,
I did a rpi-update this week (and I get the kernel 4.9.51) on Raspbian GNU/Linux 9 and the Piface Control and Display does not work anymore :

pi@raspberrypi:~ $ python /usr/share/doc/python-pifacecad/examples/sysinfo.py 
Traceback (most recent call last):
  File "/usr/share/doc/python-pifacecad/examples/sysinfo.py", line 61, in <module>
    cad = pifacecad.PiFaceCAD()
  File "/usr/lib/python2.7/dist-packages/pifacecad/core.py", line 50, in __init__
    self.init_board()
  File "/usr/lib/python2.7/dist-packages/pifacecad/core.py", line 80, in init_board
    h=self.hardware_addr, b=self.bus, c=self.chip_select))
pifacecad.core.NoPiFaceCADDetectedError: No PiFace Control and Display board detected (hardware_addr=0, bus=0, chip_select=1).

Documentation Examples error

I think that there is an error in de documentation in the part:
Examples-Basic usage-Interrupts. The part on the end: 'The Event object....' says:

import pifacecad
cad = pifacecad.PiFaceCAD()
listener = pifacecad.InputEventListener(chip=cad)
listener.register(0, pifacecad.IODIR_RISING_EDGE, print)
listener.activate()
I did try that but I get the error: AttributeError: 'module' object has no attribute 'InputEventListener'.
Is this a typo in the documentation,or is it an error in the module?
I replaced 'InputEventListener' with 'SwitchEventListener' and it works out fine. I get indeed the output on my screen.

missing she bang

bin/pifacecadsysinfo.sh
is missing a #!/bin/bash
or /usr/bin/env bash
which ever you preffer.

Where is the Schematic?

Yes, I can figure out what pins are being used, from the library, or by hooking up my scope. But I would rather have a nice schematic. Where is it please? Am I missing it?

unable to locate package python3-pifacecad

I can't handle this problem >> 'unable to locate package python3-pifacecad'
I search this issue and try some solutions. but....X(

/etc/apt/sources.list is
deb http://raspbian/raspberrypi.org/raspbian buster main contrib non-free
deb-src http://raspbian/raspberrypi.org/raspbian buster main contrib non-free

It is My first time using raspberrypi so..
i just >>booting >> typing "sudo apt-get update""sudo apt-get upgrade "
"sudo apt-get install python3-pifacecad "

What am I missing????

sysinfo.py broken in Stretch

Hi,

The example sysinfo.py is broken on stretch, it looks like the format of the command "free" has changed and this is breaking the script.

This is thrown back at me.

Traceback (most recent call last):
File "/usr/share/doc/python3-pifacecad/examples/sysinfo.py", line 75, in
show_sysinfo()
File "/usr/share/doc/python3-pifacecad/examples/sysinfo.py", line 56, in show_sysinfo
cad.lcd.write(":{}".format(get_my_free_mem()))
File "/usr/share/doc/python3-pifacecad/examples/sysinfo.py", line 35, in get_my_free_mem
used_mem = float(run_cmd(USED_MEM_CMD))
ValueError: could not convert string to float:

Regards,

listener.activate() command crashes python

I am trying to use the IR receiver in piface cad but working with the example on page 6 of the latest documentation I can find (2.0.7) when you type in the last command listener.activate() python disappears.
Anyone know the solution?

Issue with SwitchEventListener

Hi,

I'm having problems reproducing the first example under Interrupts section with the SwitchEventListener. Switch numbers are not appearing on the display, but not error message is given.

On python 3.4.2 IDLE, with 2016-02-03 raspbian-jessie

Any help appreciated

IREventListener example not working

If I try the IR receiver example on page 6 of documentation release 2.0.7
(I have modified lircrc at //etc/lirc , didn't understand $ cat ~/.lircrc)

When I get to the line

listener = pifacecad.IREventListener(prog="pifacecadexample")

I get an error message that I think is to do with multiprocessing but I am new to Python. I have put the whole error message in a post under the Python section of the Rapberry Pi forum

sysinfo.py error : could not convert string to float:

  • RPi1
  • Raspbian Buster Lite
  • PiFace Control and Display 2

while trying to execute the sysinfo.py example I get this error...

pi@raspberrypi:~ $ python ./pifacecad/examples/sysinfo.py
Traceback (most recent call last):
  File "./pifacecad/examples/sysinfo.py", line 75, in <module>
    show_sysinfo()
  File "./pifacecad/examples/sysinfo.py", line 56, in show_sysinfo
    cad.lcd.write(":{}".format(get_my_free_mem()))
  File "./pifacecad/examples/sysinfo.py", line 35, in get_my_free_mem
    used_mem = float(run_cmd(USED_MEM_CMD))
ValueError: could not convert string to float:
pi@raspberrypi:~ $
pi@raspberrypi:~ $ python3 ./pifacecad/examples/sysinfo.py
Traceback (most recent call last):
  File "./pifacecad/examples/sysinfo.py", line 75, in <module>
    show_sysinfo()
  File "./pifacecad/examples/sysinfo.py", line 56, in show_sysinfo
    cad.lcd.write(":{}".format(get_my_free_mem()))
  File "./pifacecad/examples/sysinfo.py", line 35, in get_my_free_mem
    used_mem = float(run_cmd(USED_MEM_CMD))
ValueError: could not convert string to float:
pi@raspberrypi:~ $

Occasional garbage text on LCD after fast writes

The issue is very similar to piface/libpifacecad#1
In the python library, is the an equivalent of DELAY_SETTLE_NS that we can use? I tried issuing sleep(1), while it helped, it did not fully solve the issue.
This issue occurs with an app that refreshes the screen every second.

Do you have general recommendations or knobs that can be tweaked from the python api?

Better Raspberry Pi instructions

The current installation instructions for RPi should be rewritten to use a virtual environment instead. Or anything else than sudoing setup.py or pip really

For both security and package management reasons

SwitchEventListener doesnt work

I am trying to use the SwitchEventListener as shown in the documentation but it doesnt seem to do anything, the program just hangs.

what is aptitude?

I am trying to install pifacecad on a RPi1 with Rasbian Buster Lite.

Following the of this main page there seems to be an error...

$ sudo aptitude install liblircclient-dev cython gcc python{,3}-setuptools python{,3}-dev

This doesn't work, should this be

$ sudo apt-get install liblircclient-dev cython gcc python{,3}-setuptools python{,3}-dev

LCD scanf doesn't work with newline character in text

LCD scanf doesn't work with newline character in text. The text will print in the correct place, but when using the rocker switch to flick through the different settable values, they will be off screen and move the viewing area to where they would be located if the newline character wasn't there.

eg:
scanner = pifacecadtools.LCDScanf("text here \n text %3i > %3i%r")
result= scanner.scan()

List index out of range when printing lots

import pifacecad


if __name__ == '__main__':
    cad = pifacecad.PiFaceCAD()
    cad.lcd.backlight_on()

    while True:
        cad.lcd.write("Hello EMC!")

Causes:

Traceback (most recent call last):
  File "pfcad_emc.py", line 9, in <module>
    cad.lcd.write("Hello EMC!")
  File "/usr/lib/python3/dist-packages/pifacecad/lcd.py", line 438, in write
    self.set_ddram_address()
  File "/usr/lib/python3/dist-packages/pifacecad/lcd.py", line 350, in set_ddram_address
    address = self.colrow2address(col, row)
  File "/usr/lib/python3/dist-packages/pifacecad/lcd.py", line 393, in colrow2address
    return col + ROW_OFFSETS[int(row)]
IndexError: list index out of range

After a short while.

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.