Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Hohenheim

Pages: [1]
1
I "prefare" CrunchBang. Because it's fast (very fast imo), Debian based and frankly because I'm used to it. :)
You should give it a try.


I quote, I have used CrunchBang before BackBox and it's damn fast, aslo on my cheap netbook. ;D  It uses Openbox and thunar.

2
Found it on the Webs / Re: A sneak peak at CERN's cameras
« on: April 19, 2012, 09:02:26 pm »
XD I have been there for a school trip. They told us to ignore what press says about them and to follow their documentation... They don't know why people thinks that physics are all something like crazy evil genius that wants to destroy the world with black holes or something like that.

3
Hardware / Arduino - Table football score counter
« on: April 18, 2012, 08:04:34 pm »
The project was born as a table football score counter.
It was my first project and it's very simple.

Clicking on one of the two buttons you increment a variable for the score of each team. By the difference from the two values the software print on an lcd messages like: Reds takes the lid, or OMG It's over 9000! or I don't know, whatever you want. Then during the play you can se the two scores printed on screen. If you want you can also use a flex sensor to automatically increment the variable when taking a point.
You can also create a cycle to get a game with only 10 balls.
You reset the values reinitializing arduino pushing the reset button.


There are two buttons connected with the pin 2 and 3 of arduino.
The lcd is connected as follow:
16 LED-  to Gnd
15 LED+ to 5V
14-11 DB 7-4 to 12, 11, 10, 9
10-7 Unused
6 E to 8
5 R/W to Gnd (unused)
4 RS to 7
3 V0 to a 10K ohm potentiometer
2 VDD to 5V
1 VSS to Gnd




Here the code (I'm sorry but messages are in italian... Really, I don't know how to translate them XD)
Code: [Select]

#include <LiquidCrystal.h>


LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
const int  RbuttonPin = 2;
const int  BbuttonPin = 3;


int RbuttonPushCounter = 0;   
int RbuttonState = 0;         
int RlastButtonState = 0;
int BbuttonPushCounter = 0;   
int BbuttonState = 0;         
int BlastButtonState = 0;


void setup() {
  lcd.begin(16, 2);
  lcd.print("Rossi  vs    Blu");
  pinMode(RbuttonPin, INPUT);
  pinMode(BbuttonPin, INPUT);
}


void loop() {
  RbuttonState = digitalRead(RbuttonPin);
  BbuttonState = digitalRead(BbuttonPin);
  lcd.setCursor(0, 0);
  lcd.print("Rossi  vs    Blu");
  //INCREMENTO ROSSO
  if (RbuttonState != RlastButtonState) {
    if (RbuttonState == HIGH) {
      RbuttonPushCounter++;
      if (BbuttonPushCounter - RbuttonPushCounter == 1)
          {lcd.setCursor(0, 0);
            lcd.print("   La rimonta    ");
           lcd.setCursor(0, 1);
           lcd.print("   dei rossi!   ");
           delay(2000); }
      if (BbuttonPushCounter - RbuttonPushCounter == 0)
          {lcd.setCursor(0, 0);
            lcd.print("Le squadre sono  ");
           lcd.setCursor(0, 1);
           lcd.print(" Testa a testa ");
           delay(2000);
         }
       if (BbuttonPushCounter - RbuttonPushCounter == -1)
          {lcd.setCursor(0, 0);
            lcd.print("I rossi passano ");
           lcd.setCursor(0, 1);
           lcd.print("  in vantaggio  "); 
           delay(2000);
         }
       if (BbuttonPushCounter - RbuttonPushCounter == -6)
          {lcd.setCursor(0, 0);
            lcd.print("      OMG!      ");
           lcd.setCursor(0, 1);
           lcd.print(" It's over 9000 "); 
           delay(2000);
         }
    }
    }
      RlastButtonState = RbuttonState;
   //INCREMENTO BLU
  if (BbuttonState != BlastButtonState) {
    if (BbuttonState == HIGH) {
      BbuttonPushCounter++;
      if (BbuttonPushCounter - RbuttonPushCounter == -1)
          {lcd.setCursor(0, 0);
            lcd.print("   La rimonta   ");
           lcd.setCursor(0, 1);
           lcd.print("   dei blu!    ");
           delay(2000); }
     
      if (BbuttonPushCounter - RbuttonPushCounter == 0)
          {lcd.setCursor(0, 0);
            lcd.print("Le squadre sono ");
           lcd.setCursor(0, 1);
           lcd.print(" Testa a testa "); 
           delay(2000);
         }
       if (BbuttonPushCounter - RbuttonPushCounter == 1)
          {lcd.setCursor(0, 0);
            lcd.print(" I blu passano ");
           lcd.setCursor(0, 1);
           lcd.print("  in vantaggio  "); 
           delay(2000);
         }
       if (BbuttonPushCounter - RbuttonPushCounter == 6)
          {lcd.setCursor(0, 0);
            lcd.print("      OMG!      ");
           lcd.setCursor(0, 1);
           lcd.print(" It's over 9000 "); 
           delay(2000);
         }
    }
    }
   
     BlastButtonState = BbuttonState;
    lcd.setCursor(0, 1);
    lcd.print(RbuttonPushCounter);
   
    if (RbuttonPushCounter<10) {
    lcd.print("      -      ");
  } else {
  lcd.print("     -      ");
  }
    lcd.print(BbuttonPushCounter);
  }



Pages: [1]