
Robat - An educational BAT to demonstrate ultrasonic
cults3d
Robat is an educational project I made to demonstrate how ultrasonic navigation works for the bats. It reads the distance by using an ultrasonic sensor und displays the distance on a small display at the back of the bat. This project requires some arduino work and cheap electronics. I didn´t use printed wings on the example, I used sponge rubber instead to make it consume less space. However the 3D models of the wings and the wiring plan are included. Here the arduino code used: ------------------------------------------------------8<---------------------------- #include #include #define echoPin 8 #define trigPin 9 long duration; int distance; Adafruit_SSD1306 display(4); char message[]="Hello, I am Robat and I can show you how to orientate yourself with ultrasound. To do this, I generate a sound that cannot be heard by humans and wait until the echo comes back to me. My brain then quickly converts the time that the sound needs (1236 km / h) into the distance."; int x, minX; void setup(){ pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); Serial.begin(9600); display.begin(SSD1306_SWITCHCAPVCC, 0x3C); display.setTextSize(1); display.setTextColor(WHITE); display.setTextWrap(false); x = display.width(); minX = -12 * strlen(message); } void loop(){ digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = duration * 0.034 / 2; display.clearDisplay(); display.setCursor(0,0); display.setTextSize(2); display.print(distance); display.print(" cm"); display.setTextSize(1); display.setCursor(x,20); display.print(message); display.setCursor(x,28); display.display(); x=x-5; if(x < minX) x= display.width(); }
With this file you will be able to print Robat - An educational BAT to demonstrate ultrasonic with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Robat - An educational BAT to demonstrate ultrasonic.