Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace USB_Plaatje_Digitaal
- {
- public partial class Form1 : Form
- {
- private USBboard myBoard;
- private Timer time;
- public bool Run = true;
- private byte LedData = 0;
- private byte MotorData = 0;
- public Form1()
- {
- InitializeComponent();
- myBoard = new USBboard(this);
- time = new Timer();
- time.Interval = 1;
- time.Tick += new EventHandler(time_Tick);
- time.Enabled = true;
- }
- void time_Tick(object sender, EventArgs e)
- {
- toonAlleBitpatronen();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- // Voorbeeld();
- // toonBitpatroon(200);
- // toonAlleBitpatronen();
- // teller();
- // geefDrukknopTijd();
- // progressBarLSB();
- // progressBarLSBLoop();
- // progressBarMSB();
- // progressBarMSBLoop();
- // motorSwitch();
- // motorSpeed();
- // testSpeed();
- // regelNivo();
- }
- private void Voorbeeld()
- {
- myBoard.SetLed(255);
- }
- private void toonAlleBitpatronen()
- {
- if (myBoard.GetSwitch())
- {
- for (byte i = 0; i < 255; i++)
- {
- myBoard.SetLed(i);
- }
- time.Enabled = false;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment