Comments on: Chapter 5: Programming on the Raspberry Pi https://www.exploringrpi.com Companion Site for the book Exploring Raspberry Pi Fri, 27 Apr 2018 02:56:25 +0000 hourly 1 https://wordpress.org/?v=5.0.1 By: Sud https://www.exploringrpi.com/chapter5/#comment-305 Mon, 11 Dec 2017 00:11:01 +0000 https://www.exploringrpi.com/?page_id=233#comment-305 Thanks Ken, you are right. I too had segmentation fault and was banging my head. Suddenly I remembered to look at the website for any errata message, then found your posting. Definitely great book, thank you Derek.

]]>
By: Nicholas Clark https://www.exploringrpi.com/chapter5/#comment-281 Thu, 28 Sep 2017 13:18:45 +0000 https://www.exploringrpi.com/?page_id=233#comment-281 By the way, whenever I use your module ERPiModule.so, it works fine. The problem is whenever I build the source myself, even when I build the source that I downloaded from your GitHub.

]]>
By: Nicholas Clark https://www.exploringrpi.com/chapter5/#comment-279 Thu, 28 Sep 2017 13:08:50 +0000 https://www.exploringrpi.com/?page_id=233#comment-279 Hello Dr. Molloy, I followed the example from listing 5-21 and ran the build statement that followed on page 213. When I go to run the test.py python script, I get the following:

pi@raspberrypi:~/chp05/python3_C $ python3 test.py
Traceback (most recent call last):
File “test.py”, line 2, in
import ERPiModule
ImportError: dynamic module does not define init function (PyInit_ERPiModule)

What could be going wrong here?

]]>
By: Santi Romeu https://www.exploringrpi.com/chapter5/#comment-267 Tue, 08 Aug 2017 18:39:21 +0000 https://www.exploringrpi.com/?page_id=233#comment-267 Hi!
in listing 5-1 which is also in this page on line 22 where we can read:
echo “Exporting GPIO number $1”
I consider it has no sense, it would be more logical to be:
echo “Exporting GPIO number ” $LED_GPIO
in order to be informed of which GPIO is configured

Santi

]]>
By: Michael Cuchiara https://www.exploringrpi.com/chapter5/#comment-251 Mon, 10 Jul 2017 14:56:58 +0000 https://www.exploringrpi.com/?page_id=233#comment-251 Ok, I get it….On boot, some banks of GPIO channels are pulled up and other down. I measured each : [Pulled Up at boot: 2,3,4,5,6,7,8,14,15,IDSD IDSC] but check it for yourself please. I will choose my channel assignments wisely, flashing LED lights on boot Ok but opening a valve or running a pump not so great. I guess that’s why they make “industrial controls”

Also, I’ve been doing a bit of study and found many folks with on-line instructional videos are driving LED’s directly from the channel pins and not switching with a semiconductor. I’ll stick with the safe mode and use FETs.

Great book Derek….Thanks,

Mike

]]>
By: Michael Cuchiara https://www.exploringrpi.com/chapter5/#comment-249 Sun, 09 Jul 2017 01:02:20 +0000 https://www.exploringrpi.com/?page_id=233#comment-249 Could someone be so kind and set me straight…I built the circuit on page 167 (FET 2222LA) with a twist though. I’m not using the onboard 3.3vdc supply but rather an external 5 volt power supply so the result it a single wire tied to GPIO4. I’m not floating the external power supply as I have the negative terminal tied to the ground terminal on the supply…..

Ok here it is : when the GPIO gets unexported, or after a reboot, or if I change the channel to an input ->>> the durn LED lights up.
How is that possible? Is not the FET Gate totally isolated from the Drain and the Source?

I added a diode to the Gate….did not make a difference.

Thanks a bunch, Mike in Colorado Springs (719-471-3209)

]]>
By: Michael Cuchiara https://www.exploringrpi.com/chapter5/#comment-247 Sun, 09 Jul 2017 00:47:50 +0000 https://www.exploringrpi.com/?page_id=233#comment-247 I ended up putting the repository on the RPi – I’m getting it

]]>
By: Michael Cuchiara https://www.exploringrpi.com/chapter5/#comment-245 Sat, 08 Jul 2017 18:20:17 +0000 https://www.exploringrpi.com/?page_id=233#comment-245 Page 169 – Downloading the repository : Is it best advised to download the repository to the RPi or the local machine? If the local machine, how then would you copy the files to the RPi?

]]>
By: Michael Cuchiara https://www.exploringrpi.com/chapter5/#comment-243 Sat, 08 Jul 2017 16:36:00 +0000 https://www.exploringrpi.com/?page_id=233#comment-243 On page 137 the FET wiring example indicates a 1M resistance between Vin (and the text describes why) and ground yet on page 167 the wiring diagram does not. Is this an over site, does it mater either way. Thank you for any feed back.

]]>
By: admin https://www.exploringrpi.com/chapter5/#comment-233 Sun, 11 Jun 2017 19:26:04 +0000 https://www.exploringrpi.com/?page_id=233#comment-233 Hi Chuck, You should pull down the entire repository rather than a sub directory of it. You then change to that sub directory on your local machine. The entire repository is fairly small, so it won’t take too long. Kind regards, Derek.

]]>