Ah i see, when i hit a real number, the sensor detects a sound.
i think that need to be solved by the programmer.
If hit number > 0 = no fail and count+
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the sensor is adjustable, and we can correct a failure with a button "backupturn"
It is a question of loudness :)
I have not tested much.
I have here a raspberry pi 3 for a camera project
on the floor is a dissambled dart board, i have a bit much work currently :)
We see us tomorrow in a match?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It worked well when i launched 1 dart on 1 part of board for tests so I decided to build the whole board! hard and long job ...but when everything was done the sensors did not detect the darts....
const int ledPin = 13; // led connected to digital pin 13
const int knockSensor0 = A0; // the piezo is connected to analog pin 0
const int knockSensor1 = A1;
const int threshold = 100; // threshold value to decide when the detected sound is a knock or not
// these variables will change:
int sensorReading = 0; // variable to store the value read from the sensor pin
int ledState = LOW; // variable used to store the last LED status, to toggle the light
void setup() {
pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT
Serial.begin(9600); // use the serial port
}
void loop() {
// read the sensor and store it in the variable sensorReading:
sensorReading = analogRead(knockSensor0);
// if the sensor reading is greater than the threshold:
if (sensorReading >= threshold) {
// toggle the status of the ledPin:
ledState = !ledState;
// update the LED pin itself:
digitalWrite(ledPin, ledState);
// send the string "vert!" back to the computer, followed by newline
Serial.println("vert");
}
delay(100); // delay to avoid overloading the serial port buffer
sensorReading = analogRead(knockSensor1);
// if the sensor reading is greater than the threshold:
if (sensorReading >= threshold) {
// toggle the status of the ledPin:
ledState = !ledState;
// update the LED pin itself:
digitalWrite(ledPin, ledState);
// send the string "vert!" back to the computer, followed by newline
Serial.println("rouge");
}
delay(100); //
}
Last edit: diego 2017-02-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think we can use a sound sensor to detect a wrong hit.
I will test some stuff @ the Weekend
We could use in the Arduino config a Digital 19 PIN and a http://www.ebay.de/itm/Sound-detection-sensor-module-sound-sensor-Intelligent-vehicle-Arduino-/172333346923 it is adjustable, so if a sound detectet (loud) the sensor can make PIN 19 high, or another from the matrix. and hit the button for next dart. It "SOUNDS" easy :)
Great idea @Andras. What about the false positive case ?
Diego will ask you for a sensor to detect the dart in an old fashioned dart board ;)
for false fixing we can use a key from the keyboard?
Yep maybe "backupturn" button could do the trick :)
good idea!
Note that this button already exists, and the corresponding key as well, it's "b"
i will use a FC-04
sample code:
Last edit: Andreas 2017-02-03
Ah i see, when i hit a real number, the sensor detects a sound.
i think that need to be solved by the programmer.
If hit number > 0 = no fail and count+
Yep, I can add a new input and consider it :
exemple : input_sensor = 1 and input_board = 0 then "Failed hit"
BUT
slam the door ;) ?
the sensor is adjustable, and we can correct a failure with a button "backupturn"
It is a question of loudness :)
I have not tested much.
I have here a raspberry pi 3 for a camera project
on the floor is a dissambled dart board, i have a bit much work currently :)
We see us tomorrow in a match?
hey andreas!
i worked on that 2 years ago when I wanted to create a dartboard with 82 piezo sensors!!!
http://www.ebay.com/itm/20PCS-12mm-Piezo-Elements-Sounder-Sensor-Trigger-Drum-Disc-wire-copper-/381374564334
here is the arduino soft you can use with the sensor: ("vert" : is when the power of the dart is not enough and "rouge" is when the power of the dart is good (it is like a treshold : 100 in this case)
It worked well when i launched 1 dart on 1 part of board for tests so I decided to build the whole board! hard and long job ...but when everything was done the sensors did not detect the darts....
const int ledPin = 13; // led connected to digital pin 13
const int knockSensor0 = A0; // the piezo is connected to analog pin 0
const int knockSensor1 = A1;
const int threshold = 100; // threshold value to decide when the detected sound is a knock or not
// these variables will change:
int sensorReading = 0; // variable to store the value read from the sensor pin
int ledState = LOW; // variable used to store the last LED status, to toggle the light
void setup() {
pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT
Serial.begin(9600); // use the serial port
}
void loop() {
// read the sensor and store it in the variable sensorReading:
sensorReading = analogRead(knockSensor0);
// if the sensor reading is greater than the threshold:
if (sensorReading >= threshold) {
// toggle the status of the ledPin:
ledState = !ledState;
// update the LED pin itself:
digitalWrite(ledPin, ledState);
// send the string "vert!" back to the computer, followed by newline
Serial.println("vert");
}
delay(100); // delay to avoid overloading the serial port buffer
sensorReading = analogRead(knockSensor1);
// if the sensor reading is greater than the threshold:
if (sensorReading >= threshold) {
// toggle the status of the ledPin:
ledState = !ledState;
// update the LED pin itself:
digitalWrite(ledPin, ledState);
// send the string "vert!" back to the computer, followed by newline
Serial.println("rouge");
}
delay(100); //
}
Last edit: diego 2017-02-04