With all the packages showing up at my office lately its been difficult to keep up, but one of those packages contained my Argon R1 starter kit and pH & Temperature Module so as always my Hello World program and comments for the Argon R1. The Argon R1 is a 4.2 Gadgeteer mainboard which has a Cortex-M3 processor, combined with 32MB of SDRAM and 128MB of NAND Flash which is like having a built in SD card. There are 14 sockets and it is about the same size as a Hydra board. Everything you need to get going with the Argon R1 and modules can be found here:
Note I’m running a beta version of the 4.2.0.1 firmware, but the release version should be available today on the Argon R1 site. If your using a Argon R1, do yourself a favor and download and install it. I’ve had some conversations with James regarding this board and firmware and found him to be very helpful.
One of the things I like about the Love Electronics button module is that it has both a red and green led, so its easy to indicate if the button is on/off with green/red led. The LED Array module is 7 leds, 2 green, 3 orange and 2 red in sequence and all my sample program does is light them up/down and then I found it was like a reaction game, can you stop it with none or all the leds lit?
using Gadgeteer.Modules.LoveElectronics;
using Microsoft.SPOT;
using GT = Gadgeteer;
namespace ArgonTest1
{
public partial class Program
{
private int _lights = 0;
private bool _direction = true;
private GT.Timer _timer;
void ProgramStarted()
{
Debug.Print("Program Started");
Debug.Print(Mainboard.MainboardName);
Debug.Print(Mainboard.MainboardVersion);
button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed);
_timer = new GT.Timer(100);
_timer.Tick += new GT.Timer.TickEventHandler(_timer_Tick);
button.Led1Status = true; //red led
button.Led2Status = false; //green led
}
void _timer_Tick(GT.Timer timer)
{
if (_direction)
{
if (++_lights > 7)
{
_direction = false;
_lights = _lights - 2;
}
}
else
{
if (--_lights < 0)
{
_direction = true;
_lights = 1;
}
}
ledArray.LightLeds(_lights);
}
void button_ButtonPressed(Button sender, Button.ButtonState state)
{
if (sender.Led2Status)
{
_timer.Stop();
}
else
{
_timer.Start();
}
sender.Led2Status = !sender.Led2Status;
sender.Led1Status = !sender.Led2Status;
}
}
}
In short the Argon R1 is a worthy addition to the Gadgeteer family and I look forward to using some of its unique abilities in future projects.