2013 Embedded Systems - Grant Ford

Thursday, 13 June 2013

22 - Dice

void setup()
{
  Serial.begin(9600);
}

int count = 1;

void loop()
{
  while (count < 101)
  {
    delay(1000);
    Serial.print("Roll number ");
    Serial.print(count);
    Serial.print(": ");
    Serial.println(random(1,7));
    count ++;
  }
}
Posted by grant at 02:08
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2013 (30)
    • ▼  June (25)
      • Major Project (Not Complete)
      • 32 - String conversion
      • 31 - Button + Buzzer + LED count
      • 30 - Buzzer & LED
      • 29 - Debouncer Solution
      • 28 -Buttons Serial Output
      • 27 - Reverse Button
      • 26 - Button
      • 25 A/B - Output between 2 resistors
      • 25 - 100 sixes
      • 24 - Random until 25 sixes
      • 23 - Number of sixes/dice throw
      • 22 - Dice
      • 21 - Random
      • 20 - ASCII Format
      • 19 - ASCII Table
      • 18 - Slow & Fast LEDs
      • 17 - 2 LEDs Variations
      • 16 - 2 LEDs
      • 15 - External LED
      • 14 - Blink Mostly Turned On
      • 13 - More Blicks
      • 11 & 12 - Blinks
      • 4 - Microprocessor
      • 9 - LED Videos
    • ►  May (1)
    • ►  April (1)
    • ►  March (2)
    • ►  February (1)

About Me

grant
View my complete profile
Simple theme. Powered by Blogger.