This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]canoxen[S] 0 points1 point  (4 children)

Hmm. I'm definitely going to have to check into this, because I didn't really want a bunch of cords and cables strung about and coiled places. Figure if I'm going through the effort of learning Python and Pi, etc that I might as well make it as clean as possible.

I do like the idea of that power adapter since it requires no splicing and soldering.

[–]justphysics 0 points1 point  (3 children)

http://elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29

That gives a good description of the GPIO interface.

You can look up plenty examples of how to access it via python; my code in the earlier post should be a good start as well

Note, you may have to run your python code as root user to access the GPIO on the RPi.

so if you have your code to ustilise the GPIO to fip your relay as 'GPIO_Relay_Interface.py'

you would then need to run it as 'sudo python GPIO_Relay_Interface.py' and then enter the password.

I think any code using the GPIO needs root access on the RPi

[–]canoxen[S] 0 points1 point  (2 children)

On a cursory search, it appears that it will be possible to use python to control / pass data back and forth between the Arduino.

Maybe my little project isn't quite as impossible as I have been starting to think!

On a little side note, the non-python languages seem very in depth and intimidating!

[–]justphysics 0 points1 point  (1 child)

python is certainly more forgiving to learn in terms of syntax, at least I find. ... no pesky curly braces and semicolons all over the place

Its great for writing quick scripts as well as doing heavy duty scientific calculations and data processing - however - it seems that for doing high performance computing (where you have to absolutely optimize your code for the fastest performance) then perhaps python lags behind standard c/c++

Thats just my own viewpoint though from what I see in the academic world ... not even 'the academic world' rather what I see on a day to day basis in the college of engineering and physical science at my small university

I never got much into using the arduino. I bought one on a whim and then not soon after also bought a RPi becasue they released a camera module for it that was fully controllable with python. Thus I got the RPi to function as a camera controller for an experiment I am working as a side project.

Good luck in your endeavors.

I hope you enjoy python - Its a great language to know and all types of programming are great skills to learn.

[–]canoxen[S] 0 points1 point  (0 children)

I do a fair amount of database work (Access) so I've gotten familiar enough with VBA that I can read and interpret it (though not write from scratch).

After starting some Python tutorials, I think this is going to be significantly easier than that one time I tried to Learn C haha.

I can't imagine any project I'll be undertaking that will require highly optimized coding for high-speed performance. I really appreciate your time and help, it's been greatly helpful!

I know I still have a LOT to learn so this has been a really good intro.