If you want to make portable Air quality sensor this is very easy setup. Make sure to include you mobile hostspot wifi ssid so that you can easily collect data from anywhere on the go.
Gas sensor normal takes 2-3 min to normalized it’s output vaules.
root@lp-arm-4:~# raspistill -o image_$(date +%s).jpg -w 480 -h 360
mmal: Cannot read camera info, keeping the defaults for OV5647
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Only 76M of gpu_mem is configured. Try running "sudo raspi-config" and ensure that "memory_split" has a value of 128 or greater
The 5V Relay switch require that i have require around 52mA current to work properly.
Raspberry pi max GPIO current with 5v Relay = ?
Arduino pin 13 current with 5v Relay = 38.5mA
Arduino pin 13 + 12 current with 5v Relay = 45 mA
Arduino pin 13 + 12 + 2 current with 5v Relay = 47.3 mA ( This worked )
So Now i can use Arduino as a switch on/off. Also I needed this switching to be based on some external events. So I used Aurdino Pin 2 as INPUT pin and added one 2.7K ohm resistor to from pin2 to Ground.