Just wanted to share with any folks considering picking up some of the Seeed Studio modules, I got a bunch of them late last week, and finally had the chance to start doing some testing.
So far, I’ve played with only the GPS, OLED display, and Compass modules.
The OLED display works quite nicely, but at 128x128, it’s fairly limited in terms of text display. That’s the major downside of it, apart from it being quite small. On the plus side, it only uses a single socket (versus 3-4 for the T35 display), so if you’re using a lot of other modules, and don’t need a lot of display area (or touch), it might be just the ticket.
I have not had much luck with the GPS module yet. The code looks very straightforward, but I think the GPS module may require more power than can be supplied by USB alone, and I don’t yet have a power adapter to plug into the USB DP module (something I will remedy soon). When I tested a project using the GPS module, the Spider mainboard kept connecting and disconnecting, and the OLED display kept flashing, which is what leads me to believe its a power issue.
Since I couldn’t get the GPS running, I opted to test the Compass module next. This worked a treat, and the code was very straightforward to use, with APIs to either get a spot measurement, or to start receiving continuous measurements. The returned sensor data provides the current compass heading in degrees (though the Intellisense says radians), from 0 to 359. I don’t have a known good compass to compare to, but the values seemed reasonable (though I’m not sure what value corresponds to a given compass heading…seemed like 0 was pretty close to south).
I was able to display the compass data on the OLED display, which counts as a win in my book.
I’ll update this with example code when I’m back on my other PC where the code is.
Here’s the code, as promised, in case anyone’s interested:
using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
using Gadgeteer.Modules.Seeed;
namespace CompassOLEDTest
{
public partial class Program
{
void ProgramStarted()
{
// Do one-time tasks here
Debug.Print("Program Started");
oledDisplay.SimpleGraphics.BackgroundColor = GT.Color.White;
oledDisplay.SimpleGraphics.DisplayTextInRectangle("Now running!", 2, 2, 120, 20, GT.Color.Black, Resources.GetFont(Resources.FontResources.NinaB));
compass.MeasurementComplete += new Compass.MeasurementCompleteEventHandler(compass_MeasurementComplete);
compass.StartContinuousMeasurements();
}
void compass_MeasurementComplete(Compass sender, Compass.SensorData sensorData)
{
oledDisplay.SimpleGraphics.DisplayTextInRectangle("Current heading: ", 2, 25, 120, 20, GT.Color.Black, Resources.GetFont(Resources.FontResources.NinaB));
int heading = (int)System.Math.Floor(sensorData.Angle);
oledDisplay.SimpleGraphics.DisplayRectangle(GT.Color.White, 0, GT.Color.White, 2, 45, 120, 20);
oledDisplay.SimpleGraphics.DisplayTextInRectangle(heading.ToString(), 2, 45, 120, 20, GT.Color.Black, Resources.GetFont(Resources.FontResources.NinaB));
}
}
}