0

I have a database with table pins with atributes pinNo, pinMode and pinState. I'm trying to read these raspberry pi's atributes using wiringPi in python script, and to write that data into the table in the database. I'm wondering how can I read/get pin mode? I've been searching over the internet and reading wiringPi's documentation but I haven't found any method implemented for this purpose. Is there any way to do this "manually" using python?

closed as off-topic by goldilocks Oct 12 '15 at 21:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center." – goldilocks
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Which documentation have you read? I am surprised you can not find the information you need. – joan Oct 12 '15 at 21:19
  • I've been searching through the reference on wiringpi.com.. – hideburn Oct 12 '15 at 21:37
  • You got an answer to the question you actually asked. How to use a database in python, and/or how to parse data and place it into one, are basic programming questions unrelated to the pi and as such belong on our larger parent site, Stack Overflow. – goldilocks Oct 12 '15 at 21:48
  • Please explain to me how its not related to the pi, when I actually need to get mode of the certain pin ??? I know how to use a database in python, but I dont know how to get information RELATED TO PI, that I need to store in the db. – hideburn Oct 12 '15 at 21:59
  • See also this Q&A: raspberrypi.stackexchange.com/questions/29734/… – Kolban Dec 19 '15 at 10:49
2

Using WiringPi: gpio readall will return the state of all of the pins.

  • yes it will return the state of all of the pins, but how can I use that to store wanted information into the db.. – hideburn Oct 12 '15 at 21:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.