You are in emergency mode. After logging in,

Problem:

you make a change in the fstab file and after reboot the systm you can see that your raspberry pi don't boot and show the next message:

"You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or ^D to try again to boot into default mode.
Cannot open acess to console, the root account is locked.
See sulogin(8) man page for more details.
Press Enter to continue"


but, you can't do nothing to skip this message.

Solution:

the solution is to edit fstab system file and remove the last change or remove all and leave it with default values, follow the instruction that Talha Sariyürek explain in this blog post:

https://talhasariyuerek.com/en/linux-raspberry-pi-3b3b4-emergency-mode-root-account-locked-solution/

Control RGB Led Strip using Mosfet

Problem:
You are interested in controlling a led RGB strip with a raspberry but it's not clear how to setup Mosfet because there are people that use 1 resistor, 2 resistors, others without resistors, the scheme is quite different, etc... 


Solution:
If you would like to use Mosfet as a switch to control a RGB led strip,it is recommended to use resistors in the gate port, one to the source and other to pump.
I use and old P30N06LE and it works well, as I can see everyone is using the IRLZ34N, it's important to read the mosfet datasheet Gate to Source Voltage value in the mosfet to ensure the volts needed to activation.

Circuit diagram with 2 resistors

Connection map with 1 resistor in Mosfet gate

Sources:

With 1 resistor:
http://www.knight-of-pi.org/color-mixer-control-a-rgb-led-strip-with-the-raspberry-pi-and-the-n-channel-mosfet-irlb8721/ 

Note:
Take in consideration that using a led strip, it's required to power them with a 12v power supply, if you put any wire in the wrong position,  your raspberry pi will die like mine :-) 


coding python for GPIO

Problem:
How to control electronic component connected to the GIO board ? 

Solution:
Follow the instruction of the electronic component, for exmaple led light need to be connected in serial with a resitant, active buzzers can be connected directed between the gpio output and the gnd pin.
once you have connected the electronic component, follow the next code structure to control it:

import RPi.GPIO as GPIO
import time

v_compo = 10

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(v_compo, GPIO.OUT)

print("LED on")
GPIO.output(v_compo, 1)
time.sleep(v_sleep)

print("LED of")
GPIO.output(v_compo, 0)
time.sleep(v_sleep)