Giter Club home page Giter Club logo

sunfounder_superkit_python_code_for_raspberrypi's People

Contributors

cavonlee avatar rhaendel avatar xiemeiping avatar zhen-upup 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  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

sunfounder_superkit_python_code_for_raspberrypi's Issues

Code working on python3?

Is the code running on python3? I use it on a RaspberrPi Zero with manjaro-arm. I know you only support Raspbian. But for example the "print" command is different from python2 to 3 and I had to convert it.
So my question which pythton version is supported?

ADXL345 - Raspberry Pi 3

hello, when running the example python script for the ADXL345 it generates:

IOERROR: [Errno 2] No Such File Or Directory

  1. With the ic2tools installed it shows the ADXL on address 53 when you run ic2detect
  2. I2C is enabled by Raspi-Config and restarted
  3. ADX345 hardware returns value if using another script to talk to the ADX345, the latest Sunfounder script does not work
  4. Error occurs with latest Python 2.x version

13_lcd1602.py doesn't work

Just heads up, there is something wrong in this python code as C based sample works ok(so I know wiring is correct). Just get some garbage in screen.

beginner unfriendly syntax

Is it possible to provide a coherent programming syntax in all the examples? It would be a great improvement, as for example 01_led_1.py and 02_btnAndLed_2.py follow quite different programming styles, which could be difficult to understand for python beginners.

01_led.py parentheses

When I ran this from the command line, it worked.

However when I went to change the time.sleep and ran it from the shell (Python 3.4.2 Shell), it threw up an error saying it was missing parentheses. I put parentheses around the '...led on' and 'led off...' and it worked on both.

I am new to Python, is this just related to the Shell that comes with Raspberry Pi?

11_dice.py not work

Hello again,

the dice.py does not work because there are only methods declared, it seems the initial main is missing and also the destroy() method.

regrettably if i execute this script nothing happends :/
can you please provide a fix for that ?

Request for Clarification about How the Python code Logic of writing 0x80 to DSI/SDI pin 11 once in Sequence of 8 Loops to Light a Different one of 8 LEDs each Time in 10_74HC595_LED.py

I have a question regarding the 10_74HC595_LED,py script's line 47 where it seems to write 0x80 or 128 to the DS/SDI pin on the 74HC595 chip once every eight loops through the def_hc595_in(dat) function.

I understand that 0x80 is sent to the serial Data serial in pin on the 74HC595 chip for conversion to parallel output on the 8 pins driving the 8 LEDs, at a different position in the sequence of 0-7 (bin) for each of the eight data words in the WhichLeds list. I just cannot quite yet comprehend how that lights a different LED each time through. If you put in a 128, shift that with a positive transiton of SRCLCK/the SHCP pin via pin 13 on the GPIO, wouldn't that always light the second or the seventh LED over and over again instead of sequencing through lighting all eight LEDs, e.g. once every 8 loops, per data serial in word, in of 128 total loops. per call of the def loop() function?

The code in the 10_74HC595_LED.py function/script clearly works well and succeeds lighting each of the eight LEDs first left to right, then right to left, then repeat both over and over, How the program logic invoked with the the loop, hc595(dat) and hc595_out() functions in the 10_74HC595_LED.py script actually achieves this is still more than a bit mysterious to me.

I am hoping that anyone who understands how this code logic actually works could find the time in their busy schedule to break this bit of the program execution logic and how it interacts with the 74HC595 chip to achieve these operational results down and reply in kind with a bit of low-level clarification and detail.

Request for Clarification about How the Python code Logic of writing 0x80 to DSI/SDI pin 11 once in Sequence of 8 Loops to Light a Different one of 8 LEDs each Time in 10_74HC595_LED.py

I have a question regarding the 10_74HC595_LED,py script's line 26 where it seems to write 0x80 or 128 to the DS/SDI pin on the 74HC595 chip once every eight loops through the def_hc595_in(dat) function.

I understand that 0x80 is sent to the serial Data serial in pin on the 74HC595 chip for conversion to parallel output on the 8 pins driving the 8 LEDs, at a different position in the sequence of 0-7 (bin) for each of the eight data words in the WhichLeds list. I just cannot quite yet comprehend how that lights a different LED each time through. If you put in a 128, shift that with a positive transiton of SRCLCK/the SHCP pin via pin 13 on the GPIO, wouldn't that always light the second or the seventh LED over and over again instead of sequencing through lighting all eight LEDs, e.g. once every 8 loops, per data serial in word, in of 128 total loops. per call of the def loop() function?

The code in the 10_74HC595_LED.py function/script clearly works well and succeeds lighting each of the eight LEDs first left to right, then right to left, then repeat both over and over, How the program logic invoked with the the loop, hc595(dat) and hc595_out() functions in the 10_74HC595_LED.py script actually achieves this is still more than a bit mysterious to me.

I am hoping that anyone who understands how this code logic actually works could find the time in their busy schedule to break this bit of the program execution logic and how it interacts with the 74HC595 chip to achieve these operational results down and reply in kind with a bit of low-level clarification and detail.

Lesson 12 could be WAY more simple and useful

The python code uses two vectors of 20 values to draw its diagram (the C code has both 8 values commented out or 20 values). It is hard for me, though, how to devise a drawing based on those HEX values and how to avoid ghosting.
https://github.com/sunfounder/Sunfounder_SuperKit_Python_code_for_RaspberryPi/blob/master/12_dotMatrix.py

I would advise strongly to update the code on github in order to make it easier for one to draw in binary, like a sprite, and a proper cleanup function. If I try to do any change on the values, the display stops responding and I have to do a full power off.

Something like this: http://blog.riyas.org/2013/12/online-led-matrix-font-generator-with.html

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.