Remarks
C8800Retro | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
C8800Retro altair;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initializing ...");
altair = new C8800Retro(Device.CreateI2cBus(), Device.Pins.D03);
var button1B = altair.GetButton(C8800Retro.ButtonColumn._1, C8800Retro.ButtonRow.B);
button1B.Clicked += Button1B_Clicked;
graphics = new MicroGraphics(altair)
{
CurrentFont = new Font4x8(),
};
return base.Initialize();
}
private void Button1B_Clicked(object sender, EventArgs e)
{
Console.WriteLine("Button 1B clicked");
}
public override async Task Run()
{
altair.EnableBlink(true, true);
graphics.Clear();
graphics.DrawText(0, 0, "MF", Color.White);
graphics.Show();
await Task.Delay(6000);
altair.EnableBlink(false);
}
Sample project(s) available on GitHub
Syntax
public class C8800Retro : As1115, IDisposable
Constructors
C8800Retro(II2cBus, IPin, Byte)
Creates an Altair 8800 retro click board object
Declaration
public C8800Retro(II2cBus i2cBus, IPin buttonInterruptPin, byte address = null)
Parameters
Type | Name | Description |
---|---|---|
II2cBus | i2cBus | The I2C bus |
IPin | buttonInterruptPin | The interrupt pin |
System.Byte | address | The I2C address |
Methods
GetButton(C8800Retro.ButtonColumn, C8800Retro.ButtonRow)
Get the button for a given row and column
Declaration
public IButton GetButton(C8800Retro.ButtonColumn column, C8800Retro.ButtonRow row)
Parameters
Type | Name | Description |
---|---|---|
C8800Retro.ButtonColumn | column | The column of the button (1-4) |
C8800Retro.ButtonRow | row | The row of the button (A-D) |
Returns
Type | Description |
---|---|
IButton | The IButton object |