July 2013 Blog Posts (3)

OpenCV4Android - Displaying Preview in Portrait Mode

Normally OpenCV for Android displays the preview in landscape mode. For STEMbot1 and STEMbot2 I needed to display the preview in a portrait mode.

Here is the code I came up with.

In your manifest file change the orientation from landscape to portrait.




Added by eric gregori on July 27, 2013 at 3:55pm — 1 Comment

Controlling Two RC Servos Using a MSP430G2231

The following is code to control two RC servos using the timers on a MSP430G2231.

The only interrupt occurs when the timer counter overflows (approximately every 16ms).

Simply set Servo1Abs or Servo2Abs to the desired servo position // 2000 - 10000

#include "MSP430G2231.h"

#define SERVO_CENTER 5625 // Measure by adjusting until scope shows 1500us

#define SERVO_MIN 1875 

#define SERVO_MAX…


Added by eric gregori on July 26, 2013 at 3:31pm — 1 Comment

Interfacing to Android Using the EMGRobotics A2SCB and A2MCB


Added by eric gregori on July 12, 2013 at 5:38pm — No Comments

Monthly Archives






© 2017   Created by eric gregori.   Powered by

Badges  |  Report an Issue  |  Terms of Service