Comments (10)
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.
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.
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.
Original comment by [email protected]
on 27 Mar 2013 at 11:59
- Added labels: Priority-Medium
- Removed labels: Priority-Low
from webiopi.
Original comment by [email protected]
on 28 Mar 2013 at 12:03
- Changed state: Accepted
from webiopi.
Original comment by [email protected]
on 4 Jan 2014 at 9:01
from webiopi.
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.
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.
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.
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)
- Adafruit MCP9808 Temperature Sensor HOT 2
- PiFaceDigital driver has missing close() method
- Dont work on Raspberry 2 HOT 6
- Unable to grab Webiopi or to communicate the problem. HOT 1
- WebIOPi not working on Raspberry Pi 2 HOT 2
- NameError: global name 'GPIO' is not defined HOT 18
- Customzed HTML file is not loading HOT 1
- DAC MCP4921 HOT 1
- error 403
- Google Analytics enabled, not to be disabled (easily), not shown in documentation
- ~
- WebiOpi Tutorial_Basis don´t work for me
- rpi.gpio not working after installing webiopi HOT 2
- Saving matplotlib figure
- Webiopi is not working on Raspberry 2 HOT 1
- POST set function to PWM not working HOT 1
- Cannot install Webiopi on RPi 2
- Apache
- I cannot see all of the 40 raspberry pi pins on the Webiopi
- gpio boxes greyedout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webiopi.