Power-LED and shutd...
 
Notifications
Clear all

[Solved] Power-LED and shutdown-button

17 Posts
4 Users
2 Reactions
1,320 Views
Micha_AC
Posts: 41
Topic starter
(@micha_ac)
Trusted Member
Joined: 5 years ago

Hi,

I'd like to add a shutdown-button, and a power-LED to my Fabscan.
Since I prefer using wifi, the network-LEDs on the front are not lit.
So I'd like to add a 2mA low-current LED on a GPIO pin.

Is there already an instruction for this?

When pressing the shutdown-button I'd like to send a "shutdown -h 0" to avoid connecting by ssh for just shutting down.

Reply
16 Replies
etofi
Posts: 14
(@etofi)
Active Member
Joined: 4 years ago

Have you implemented this in the meantime?
And if so, how?

Reply
Micha_AC
Posts: 41
Topic starter
(@micha_ac)
Trusted Member
Joined: 5 years ago

Nope. As my fabscan wans't running properly, I didn't spend any time on it.
At the moment I'll give it another attempt. If it works, I'll see what I can do ;)

Reply
etofi
(@etofi)
Joined: 4 years ago

Active Member
Posts: 14

@micha_ac

I solved it myself

Reply
Micha_AC
(@micha_ac)
Joined: 5 years ago

Trusted Member
Posts: 41

@etofi which GPIO did you use? The schematics is not clear which one is free :(

Reply
etofi
(@etofi)
Joined: 4 years ago

Active Member
Posts: 14

@micha_ac

I found the solution here in the forum

Reply
Micha_AC
(@micha_ac)
Joined: 5 years ago

Trusted Member
Posts: 41

@etofi thanks ;)

Reply
mario
Posts: 570
Admin
(@mario)
Honorable Member
Joined: 6 years ago
Reply
Micha_AC
Posts: 41
Topic starter
(@micha_ac)
Trusted Member
Joined: 5 years ago

 

fabscan extender issue

I asume it's no shell script :D
So how do I start the installer? I assume it's a python script...

Reply
Micha_AC
Posts: 41
Topic starter
(@micha_ac)
Trusted Member
Joined: 5 years ago

okay, it's just a simple sudo python ./install

fabscan extender solved

 

Reply
etofi
(@etofi)
Joined: 4 years ago

Active Member
Posts: 14
Posted by: @micha_ac

okay, it's just a simple sudo python ./install

fabscan extender solved

 

That ist correct. But you need some more Hardware (see GitHub page). Installing the Script is not enough.

 

Reply
Micha_AC
(@micha_ac)
Joined: 5 years ago

Trusted Member
Posts: 41

@etofi Yes, it is, I soldered the switch before I could manage to get the script working.
I'm more the hardware guy....as sonn as I knew which GPIO to use, I finished the hardware ;)

Btw. if anymody else is interested in this: you can use any resistor from 1k to10k ohms as an pullup. There's no info on this on github ;)

Reply
mario
Posts: 570
Admin
(@mario)
Honorable Member
Joined: 6 years ago

I never tested it. You should open an issue on GitHub and ask the project owner.

Reply
Micha_AC
(@micha_ac)
Joined: 5 years ago

Trusted Member
Posts: 41

@marioThat's exactly what I added on github: https://github.com/helgetnt/fabscanpi-extender/issues/1

Reply
helgetnt
Posts: 19
(@helgetnt)
Active Member
Joined: 6 years ago

Hello,

I have now retested the installation script and it starts on my system.

What I have done:

- download zip from github & extract it

- open a terminal

- change to folder ' fabscanpi-extender-master/fabscanpi-extender '

- Enter ' ./install ' & press Return

 

'sudo' in front of it is not necessary.

Alternatively, if that doesn't work for you, enter ' python ./intall ', then it should work.

 

Sincerely Helgetnt

 

Reply
helgetnt
Posts: 19
(@helgetnt)
Active Member
Joined: 6 years ago

I think you can also adjust the 'switch' variable in the script so that the internal pullup resistor is used.

...not yet tested.

The internal pull up / down resistors have a value of approximately 50KΩ on the Raspberry Pi.

For button & led's you can actually use any GPIO you want. Only the following 3 not ...

PIN | GPIO(BCM) | WiringPi | Name | Function
 8    |   14              |   15         |  TxD     | serial
10   |   15              |   16         |  RxD     | serial
 7    |     4              |     7         | 1-wire   | autoreset

....of course you have to adjust the variables in the script.

--------------------------------------------------------------------------------------------------------------------------------------------

The first sentence in my Github README.md says ...

"Just use ./install to install the Extender."    

.... and NOT  ' bash ./intall '  !!!

.... since everything is written in Python, you can of course also use 'python ./install' .

..... if './install' is started without 'sudo', the script asks for the root password and then restarts itself with root rights.

Reply
mario
Posts: 570
Admin
(@mario)
Honorable Member
Joined: 6 years ago

I will prove if i can include the script into the next image 

Reply
Share: