Hardware Reference
In-Depth Information
° If the user that failed to log in was pi , see whether the number in
FAILCOUNT is greater or equal to MAXFAIL and if so, start the self_
destruct sequence.
6.
The last step is to make the script executable with the following command:
pi@raspberrypi ~ $ sudo chmod +x /home/slatfatf.sh
To verify that your trigger mechanism is set up correctly, you can make a
failed login attempt with the pi user to see that the / home/slatfatf.count
file is created.
Summary
We kicked off our final chapter with a few words of advice about taking your Pi
outside the house. You learned that a battery pack is a good source of power for the
Pi and that you can be very creative with your housing as long as the container is
resistant to moisture.
As you wouldn't bring a router or access point with you outside, we looked at how
to connect a laptop directly to the Pi using either a wired connection with static IP
addressing or an ad hoc Wi-Fi network. Should you need to connect more than two
computers, you also have the option of turning the Pi into a Wi-Fi access point with
optional Internet sharing.
We then expanded our outdoor adventure with a GPS receiver and saw how to track
the Pi's position in real time on Google Earth. You also learned how to log waypoints
along the route so that the journey can be retraced on Google Earth at a later time
and how to massage GPS data collected from Kismet into an access point map.
Finally, we explored the GPS as an alternative time source for the Pi and how all the
GPS features we've covered could be started at boot time with a simple script.
We moved over to our smartphone for a spell and saw how an Android or iPhone
app could be used to construct a custom remote control by sending commands over
SSH to the Pi at the touch of a button.
Proving that machines can also be social, we let the Pi post status updates on Twitter
on a regular basis with an optional link to a longer document and GPS coordinates.
We could also let it send e-mails to inform us about important updates at regular
intervals using the cron scheduler.
Sharing files between the Pi and all your other devices was made a little easier
using the Dropbox online file hosting service, where a common folder can be kept
synchronized and up to date among all computers.
 
Search WWH ::




Custom Search