Techplex Labs
  • Home
  • Projects
    • Home Heating Automation
    • Plextex
    • ISTE Desgins >
      • A Modern OpenConcept Design
      • A Modern OceanView Design
      • A Modern Lloyd-esq Design
    • Desk Expander
    • Belgrade Public Library Renovation Project
  • Portfolio
  • Blog
  • Contact

Thoughts...

Using PID to Drive Straight and A Measured Distance

2/5/2017

0 Comments

 
Back in the Recycle Rush days we figured out that having two PID controllers in one command is very challenging. The solution was to have one "P" controller in the Drivetrain Subsystem to correct the robot driving straight, and to have a full PID controller in a command to drive a distance.
​
Here is the method in the Drivetrain subsystem to drive straight.
Note: the HDrive call essentially simplifies to a call to arcade drive.

The real magic happens in the command. In the usePIDOutput we do a bit of massaging on the output value.
  • First we constrain output between negative maxspeed and maxspeed.
  • Then we increase any output value less than .4 to .4 as that seemed to be the minimum speed to make the robot move.
  • Then we set an acceleration rate with a time dependent function so the wheels don't spin out when the PID initially becomes active and calclulates a large error
0 Comments

Deploying Meteor Applications with Ansible

1/8/2017

0 Comments

 
Recently I've been doing a lot of work with the Meteor web application framework. There is a lot that goes into properly deploying real time web applications. Early on in the process I wrote a set of ansible playbooks and roles to configure a production environment and deploy the Meteor code.

​At a high level the idea is to have a load balancer which distributes traffic between the Meteor application instances. Using a load balancer also allows us to take application servers offline for maintenence and updates without distrupting traffic.
Picture
Below is an ansible playbook which facilitates deploying code to the application servers and the associated run.json which can be used with the fantastic process manager pm2
In a future update I hope to be able to post the complete ansible repository used to deploy and configure server for Meteor applications.
0 Comments

GPIO Kernel Module for the RPI

4/13/2013

3 Comments

 
The driver project is done!

Report

Picture
Click to read the report
Interested in the design of the module? Checkout my project report:
Read it here

Code

I've posted the source code of the module on Github:https://github.com/TechplexEngineer/RPi-GPIO-Kernel-Midule

Low Level RPi Registers

Picture
Click for larger view
If you aim to travel down to the Raspberry Pi's low level registers to control your GPIO pins this resource might help you. In the process of developing my Kernel Module I needed a register map that was easy to understand and didn't require a lot of mental visualization. Since the documentation from Broadcom describes the registers quite well I was able to make a more visual document to aid in my debugging and development.

3 Comments

The need for a GPIO Kernel Module on the RPi

4/6/2013

2 Comments

 
Picture
The Raspberry Pi(RPi) is a credit card sized computer that is an amazing and affordable toy. Lest we forget the numerous uses in prototypes and experiments.

Anyone that has experimented with using the GPIO(General Purpose Input & Output) pins on the RPi may have noticed that their program must be run as root (with sudo). For me this is rather bothersome, I don't like running any program as root unless I absolutely have to. In my research I found that Gordon over at projects.drogon.net has an amazing Wiring like library for the Raspberry Pi called WiringPi ofcourse! He's also included a nifty GPIO command line utility which allows exporting GPIO to a "/sys/class/gpio/" interface thereby allowing user code to access the pins without being run as root.

I think we can do better! Lets talk Linux Kernel for a minute here, the kernel is a resource manager, the GPIO pins are a resource. The out of the box kernel doesn't support our gpio pins! Dang..... No problem we'll just write a Kernel Module to manage access to our GPIO pins.

There are a bunch of ways to provide access to the GPIO pins, in my case ioctl calls will work just fine. 

So there's the background, heres the news:
I'm developing a linux kernel module that will provide an ioctl interface to the Raspberry Pi's GPIO pins so that programs in userspace can access the pins without being run as root.

The next steps are to write a wrapper for my modules low level interface to make using it more appealing in everday code. Following that I'm hoping to integrate it into WiringPi for an even more streamlined approach.

Stay tuned! I hope you are excited as I am!

Raspberry Pi is a trademark of the Raspberry Pi Foundation

2 Comments

Making Cygwin Useable

3/31/2013

1 Comment

 
Picture
I spend a lot of time working in the terminal, often on a ubuntu/debian linux. But there comes those times when working with on windows is is more convenient  For those occasions, I use Cygwin.

Up until today whenever I wanted to copy or paste something into the terminal, I'd have to right click copy...right click paste.  So I got thinking, there has got to be a way to change the keyboard mapping so I can use a more natural combination like strl+shift+c ... and it turns out there is. Here's how to enable the feature.


Picture
1. Start Cygwin
Picture
3. Choose "Options" from the dropdown context menu
Picture
5. Make sure the "Ctrl+Shift+letter shortcuts" checkbox is checked.
Picture
2. Click the cygwin icon in the upper leftmost corner of the window
Picture
4. Click on the "Keys" item in the tree list on the left.
Next time you need to copy or paste in your terminal, just press the shift k
1 Comment

Javascript + Canvas + Image = Awesome Tiles

4/24/2012

2 Comments

 
In my never ending quest to take over the world... A hem... I mean my work on PlexTex I came across needing a nifty little utility that would take an image and allow me to tile it .

I started out thinking that I could just use jquery to manipulate the DOM and add some more image tags and resize them, but that didn't solve my other need. I want to be able to change the tint of the image.... (Gotta figure that part out) But I was really excited with this so I thought I would post a link here.

Let me know what you think!http://jsfiddle.net/TechplexEngineer/kBJdd/ 
2 Comments

I didn't know what I was missing

4/11/2012

0 Comments

 
I just learned today that Netbeans out of the box auto-completion needs a bit of a kick start to better complete php in Codeigniter applications.

Check out these great directions on the CI Forums
CI_Autocomplete_2.0.php
File Size: 1 kb
File Type: php
Download File

0 Comments

Binary printf format implemetation

2/14/2012

0 Comments

 
Just recently, I was wanting to print binary numbers from a c program to standard output. I very quickly learned that there was not a nice format character already defined. 

After a couple hours work I finally got something I liked.
Also posted on StackOverflow
main.c
File Size: 1 kb
File Type: c
Download File

0 Comments

History of the internet

2/6/2012

1 Comment

 
I hope this brings some insight. 
1 Comment

How the web works

2/1/2012

1 Comment

 
This is your new blog post. Click here and start typing, or drag in elements from the top bar.
Picture
Click image to enlarge.
Again, I hope that this brings some enlightenment so those interested.
As always feel free to comment if something is unclear or is incorrect.
1 Comment
<<Previous

    Author

    Blake is a recent graduate of the University of Maine with a Computer Engineering degree. Blake set out to work closely with industry professionals to provide products and solutions specially tailored to some of the costliest problems. 

    Picture

    Archives

    February 2017
    January 2017
    April 2013
    March 2013
    April 2012
    February 2012
    December 2011
    November 2011
    August 2011

    Categories

    All
    Apache
    Code
    FRC
    Javascript
    Linux
    Nginx
    PID
    Robotics
    Web

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home
  • Projects
    • Home Heating Automation
    • Plextex
    • ISTE Desgins >
      • A Modern OpenConcept Design
      • A Modern OceanView Design
      • A Modern Lloyd-esq Design
    • Desk Expander
    • Belgrade Public Library Renovation Project
  • Portfolio
  • Blog
  • Contact