Giter Site home page Giter Site logo

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
I thought this one and I would like to reuse the GPIO setup/reset notation and 
generalize it to other kind device.

Assume we have :
[DEVICES]
mygpio = MCP23017
mydac = MCP4921

then we could have :
[mygpio]
# setup
1 = IN
2 = OUT 0
3 = OUT 0
4 = OUT 1

[~mygpio]
# reset
1 = IN
2 = IN
3 = IN
4 = OUT 0

[mydac]
0 = 1.0

Original comment by [email protected] on 25 Feb 2013 at 1:50

  • Added labels: Priority-Low, Type-Enhancement
  • Removed labels: Priority-Medium, Type-Defect

from webiopi.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
this is even better as it handles the value (re)setting also. maybe pullups can 
be done also this way.

Original comment by [email protected] on 25 Feb 2013 at 2:06

from webiopi.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
I think I will add this after the next release as we can init devices using 
custom scripts and deviceInstance(name) Python function.
But I moved device init before script loading or the device will be not found 
in script setup().
I also imported deviceInstance in root package, to help calling it using 
webiopi.deviceInstance
see r977

Original comment by [email protected] on 25 Feb 2013 at 7:51

from webiopi.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024

Original comment by [email protected] on 27 Mar 2013 at 11:59

  • Added labels: Priority-Medium
  • Removed labels: Priority-Low

from webiopi.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024

Original comment by [email protected] on 28 Mar 2013 at 12:03

  • Changed state: Accepted

from webiopi.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024

Original comment by [email protected] on 4 Jan 2014 at 9:01

from webiopi.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Is this issue solved in webiopi-0.7.0?
How do you setup pullups or pulldowns in the config file?

Best regards

Jacques

Original comment by [email protected] on 30 Mar 2014 at 3:36

from webiopi.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
No, 0.7.0 makes no updates here.

Pullups/downs can be set for GPIOs, but I don't know exactly how, there was 
some answer in the support group how to do that some days/weeks ago, please use 
the search function of the group to find it.

Best

Andreas

Original comment by [email protected] on 31 Mar 2014 at 12:15

from webiopi.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hello, 
I have found a python program which does it, could it be done also in the 
Webiopi config file ?

#1/usr/bin/env python
#sample python code to test digital inputs on Custard Pi 2
#www.sf-innovations.co.uk
#This program sets up pins 7,22,18 & 16
#As inputs with a pull up resistor
#Scans all 4 inputs
#Prints results to screen
#Waits 1 second
#Repeats 10 times
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)

GPIO.setup(7, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(16, GPIO.IN, pull_up_down=GPIO.PUD_UP)

Best regards

Jacques

Original comment by [email protected] on 1 Apr 2014 at 9:15

from webiopi.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Sorry, no WebIOPi has been implemented to be NOT dependent on other packages or 
components.

The code you show uses the RPi.GPIO package which is NOT part of WebIOPi. Both 
can't  be used together as their functionality overlaps partly.

However, the calls you show above can (almost identical) be put into a WebIOPi 
custom script in the setup() section (thus overlaps). The idea is to avoid this 
and allow such settings with WebIIOPi config file entries.

But, as I mentioned, this is still tbd.

Andreas

Original comment by [email protected] on 1 Apr 2014 at 10:18

from webiopi.

Related Issues (20)

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.