LetsEncrypt Certificates go liveApril 25, 2016Less than 1 min read I’m live with the Lets Encrypt certificates for the blog.mcgarrah.org website. This has been awhile in the making and I’m kind of excited. I’m on a legacy environment with Ubuntu 12.04 LTS so part of the process is manual but certificate update just happens nicely. Updating the Apache config files has a little bit of effort but nothing too bad. read more Artificial Intelligence for Robotics (CS8803-001)December 21, 2015Less than 1 min read Artificial Intelligence for Robotics (CS8803-001) Associated with Georgia Institute of Technology Fall Semester 2015 The goal for the final project in CS6475 AI for Robotics was to create a robotic platform to investigate computer vision technology. The platform included an Arduino with sensors and motors and a Raspberry Pi 2 for the vision and primary control system. The project URL is a video channel that shows the progress and challenges. read more Raspberry Pi 2 built-in LEDOctober 24, 20152 min read For an assignment in my robotics class, I need to have an autonomous system react to the environment around it. Reacting can be as simple as flashing a LED if a sensor detects a change. I have two objectives for the Raspberry Pi 2 (RasPi2) and those are to take a picture using the 5mp webcam and flash a LED. I could use the standard GPIO pins and setup a separate LED but noticed we have two perfectly good LEDs built into the board. Reading on these built-in LED did not elicit any clear way of interacting with them from the regular Linux documentation. I informally called them the Red Power and Green DiskIO LEDs. It was by reading the headers to the source for Windows 10 for Raspberry Pi 2 that I found the GPIO pinouts for these two LEDs. They are: 35 Red Power LED 47 Yellow DiskIO LED read more Python TimeDate functionsMarch 19, 20151 min read I needed a quick understanding of the Python 3.3.0 datetime functionality to do a difference in times across days. Python make it amazingly easy. import datetime from datetime import timedelta # get current timedate now = datetime.datetime.now() print "now: " + str(now) # get one day of time oneday = timedelta(days=1) # make one day in the future and past tomorrow = now + oneday yesterday = now - oneday print "tomorrow: " + str(tomorrow) print "yesterday: " + str(yesterday) # compare times if now < tomorrow: print "now < tomorrow" elif now > tomorrow: print "now > tomorrow" else: print "now must be equal tomorrow" if now > yesterday: print "now > yesterday" elif now < yesterday: print "now < yesterday" else: print "now = yesterday" The expected results are: CMD> python time.py now: 2015-03-19 14:30:31.083000 tomorrow: 2015-03-20 14:30:31.083000 yesterday: 2015-03-18 14:30:31.083000 now < tomorrow now > yesterday I hope this helps someone. read more Posts 2016-04-25 LetsEncrypt Certificates go live 2015-12-21 Artificial Intelligence for Robotics (CS8803-001) 2015-10-24 Raspberry Pi 2 built-in LED 2015-03-19 Python TimeDate functions
LetsEncrypt Certificates go liveApril 25, 2016Less than 1 min read I’m live with the Lets Encrypt certificates for the blog.mcgarrah.org website. This has been awhile in the making and I’m kind of excited. I’m on a legacy environment with Ubuntu 12.04 LTS so part of the process is manual but certificate update just happens nicely. Updating the Apache config files has a little bit of effort but nothing too bad. read more
Artificial Intelligence for Robotics (CS8803-001)December 21, 2015Less than 1 min read Artificial Intelligence for Robotics (CS8803-001) Associated with Georgia Institute of Technology Fall Semester 2015 The goal for the final project in CS6475 AI for Robotics was to create a robotic platform to investigate computer vision technology. The platform included an Arduino with sensors and motors and a Raspberry Pi 2 for the vision and primary control system. The project URL is a video channel that shows the progress and challenges. read more
Raspberry Pi 2 built-in LEDOctober 24, 20152 min read For an assignment in my robotics class, I need to have an autonomous system react to the environment around it. Reacting can be as simple as flashing a LED if a sensor detects a change. I have two objectives for the Raspberry Pi 2 (RasPi2) and those are to take a picture using the 5mp webcam and flash a LED. I could use the standard GPIO pins and setup a separate LED but noticed we have two perfectly good LEDs built into the board. Reading on these built-in LED did not elicit any clear way of interacting with them from the regular Linux documentation. I informally called them the Red Power and Green DiskIO LEDs. It was by reading the headers to the source for Windows 10 for Raspberry Pi 2 that I found the GPIO pinouts for these two LEDs. They are: 35 Red Power LED 47 Yellow DiskIO LED read more
Python TimeDate functionsMarch 19, 20151 min read I needed a quick understanding of the Python 3.3.0 datetime functionality to do a difference in times across days. Python make it amazingly easy. import datetime from datetime import timedelta # get current timedate now = datetime.datetime.now() print "now: " + str(now) # get one day of time oneday = timedelta(days=1) # make one day in the future and past tomorrow = now + oneday yesterday = now - oneday print "tomorrow: " + str(tomorrow) print "yesterday: " + str(yesterday) # compare times if now < tomorrow: print "now < tomorrow" elif now > tomorrow: print "now > tomorrow" else: print "now must be equal tomorrow" if now > yesterday: print "now > yesterday" elif now < yesterday: print "now < yesterday" else: print "now = yesterday" The expected results are: CMD> python time.py now: 2015-03-19 14:30:31.083000 tomorrow: 2015-03-20 14:30:31.083000 yesterday: 2015-03-18 14:30:31.083000 now < tomorrow now > yesterday I hope this helps someone. read more