Coder Social home page Coder Social logo

s2-pi's Introduction

s2-pi

A Demo and Tutorial for Creating Scratch 2 Extensions For The Raspberry Pi

To install type:

sudo pip3 install s2-pi

To learn how to create your own extensions, please read the tutorial.

This project has been crafted with Pycharm

s2-pi's People

Contributors

sobreira avatar mryslab avatar

Stargazers

Sabir avatar littleggghost avatar Paulo Carvalho avatar Tim Rossiter avatar  avatar Asier Iturralde Sarasola avatar 刘荣飞 avatar

Watchers

James Cloos avatar  avatar  avatar Footleg avatar  avatar  avatar

s2-pi's Issues

pip install does not load auxiliary files

PyPi has changed and as a result, it cannot run some of the Python code in setup.py, specifically the "call" requests.
As a result, all installations should now not use pip to install.
Download the code and run setup.py.

Fixed in version 1.10 (the fix is no longer supporting pip installs).

Using Servo and Scratch

Hi, first of all congratulation for this development.
I am a big fan of your work.
Do you know if is possible to add a servo control (to use scratch blocks controlling a servo) in s2-pi as it's available in s2aio?

Thanks in advance

Clarification for Scratch setup (Using The s2-pi Blocks section?)

Hi -thanks for this plugin! I just wanted to point out something that was a bit confusing to me. If you place the connect to s2_pi server block under ANYTHING that is executed more than once (like the green flag), you will get confusing behavior - specifically for inputs. You will get multiple connections to the daemon and each connection will trigger the input callback (you can see this from the terminal s2pi output). Then if you restart the sketch again (like with the "green flag") you will reconnect another time - leading to 3x the callbacks and so on... So it might be nice to update the setup section to mention that the connect to s2_pi server and any set BCM PIN as an Input commands need to be placed on the sketch and must be triggered ONCE by the user manually when they open the sketch. Any other placement or usage of these setup blocks will lead to multiple callbacks for the input changes - which (depending on your sketch) can do unexpected things :)

Unknown command received when create a new block

Hi Alan,
I am trying to include more devices in this extension, however I am stuck in 2 things:

  1. When I include a new blocks, I receive the following error message when block is selected: (Unknown command received XXX).
    I tried to copy a "working" blocks just changing the names and variables names and the error message is the same - file is attached with this scenario.
    Have you seen this issue before?

  2. Is it possible to include another block for input new devices? Like a LDR, LM35, potentiometer (both are analogic - so I am trying to use a MCP3008 to get up to 8 analogic port - in Python worked fine.
    Or Digital device like ds18s20 or DHT11/22.
    I have tried several aproaches without success.

In Python this simple code works fine and I tried to incorporate it - no success at all
from gpiozero import MCP3008
pin = 2
pot = MCP3008(pin)
while True:
print("%.2f" % round(pot.value)

s2-pi-master.zip

Thanks!

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.