public IC_74HC595(IC_Chain ic_Chain) { ICChain = ic_Chain; icSeg = ICChain.AddIC(); output = new char[8]; ClearOutput(); }
public static void Main() { SegLedChain = new IC_Chain(Pins.GPIO_PIN_D0, Pins.GPIO_PIN_D1, Pins.GPIO_PIN_D2, Pins.GPIO_PIN_D3); SegLed2 = new IC_74HC595_7SEG(SegLedChain); SegLed1 = new IC_74HC595_7SEG(SegLedChain); SegLed2.Initialize(5, 4, 2, 1, 0, 6, 7, 3); SegLed1.Initialize(6, 7, 2, 1, 0, 5, 4, 3); SegLedChain.ClearChain(); /*RClock = new OutputPort(Pins.GPIO_PIN_D8, true); SRClock = new OutputPort(Pins.GPIO_PIN_D9, true); Data_Pin = new OutputPort(Pins.GPIO_PIN_D7, true); RClear = new OutputPort(Pins.GPIO_PIN_D10, true);*/ // InterruptPort btBreadBoard = new InterruptPort(Pins.GPIO_PIN_D0, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeBoth); // btBreadBoard.OnInterrupt += new NativeEventHandler(button_OnInterrupt); //InterruptPort pirFront = new InterruptPort(Pins.GPIO_PIN_D1, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow); // pirFront.OnInterrupt += new NativeEventHandler(button_OnInterrupt); while (true) { DisplayTempurature(); Thread.Sleep(500); } /* RClock.Write(false); pushPin(8); SRClock.Write(false); RClock.Write(true); Thread.Sleep(1000);*/ /*while (true) { RClock.Write(false); Data_Pin.Write(true); SRClock.Write(true); //pushPin(4); SRClock.Write(false); RClock.Write(true); Thread.Sleep(5000); /* RClock.Write(false); //pushData(2); pushPin(8); SRClock.Write(false); RClock.Write(true); Thread.Sleep(500); }*/ }