Hello Chris,
I've completed the robot. It's working. Here I want to start the robot's program with a physical button instead of the mouse. What can I do for this?
Thanks...
That is a good idea and one that has been brought up several times. The main issue is that the commands are fed and executed from the windows PC so its hard to have a physical button on the teensy that tells the computer to start sending moves from the command line. I will keep thinking about a way to make this happen. I have thought about trying to find a way to upload the actual motion program to the teensy board and then running without the PC but this will take some development. Let me know if anyone has any ideas on this and I will add this to my list of future updates.
Would it be possible to have a Raspberry pi (or similar sbc) running in the electronics enclosure with the AR software running which could then be triggered by a button to execute commands?
I think that's a good potential solution.
I've been doing this by just starting the program once from the PC and then having it wait for an input on the arduino (though I use a pi pico) that I have wired a button to. So it's one work around to the problem.
const int buttonPin = 2; // Buton pinini belirtin (örnekte 2 numaralı pin kullanıldı)
const int ledPin = 13; // LED pinini belirtin (örnekte 13 numaralı pin kullanıldı)
int buttonState = 0; // Buton durumu değişkeni
void setup() {
pinMode(ledPin, OUTPUT); // LED pinini çıkış olarak ayarlayın
pinMode(buttonPin, INPUT); // Buton pinini giriş olarak ayarlayın
}
void loop() {
buttonState = digitalRead(buttonPin); // Buton durumunu okuyun
if (buttonState == HIGH) { // Buton basıldığında
digitalWrite(ledPin, HIGH); // LED'i yakın
delay(1000); // 1 saniye bekle
digitalWrite(ledPin, LOW); // LED'i söndür
}
}
___________________________________________________________________
@Chris Annin is it possible with this code? is it ok if i install teensy4.1? Can you test this?