Posts

Showing posts from January, 2023

05. Micro Python SW - Automated St. Andrews crossing

Image
Hi, MicroPython board set Use the MicroPython SW bellow in your project. Same software controls LEDs, barrier and Buzzer, just need to connect it as explained before. To load sw into pyboard first you need to copy code below in to a .txt on your PC using a notepad or simillar (I use notepad++ ). Save with name main.py Connect board via USB cable to PC, when external device ( pyboard ) is detected load the file into the root of the pyboard . You override the empty file already in the board with same name. Reset pyboard in the RST button. Test and adjust as bellow the v1.0 of the Python code explained. Updated version on post 04. Train crossing (part 2) - Automated barrier    *** # turn on_off external LEDs, Servo and Buzzer on an external iR input, for a Train Crossing / St. Andrews Crossing # Libraries import time, pyb, machine, math from pyb import Pin, Servo, DAC from array import array def ACT_PN(x):     pyb.LED(1).on()     # internal ...

04. Train crossing (part 2) - Automated barrier

Image
Hi, So, you successfully finished your LED Traffic Lights, nice! Lets move up a scale and get into the automated barrier.   This second part is more complex yet still doable.  * Read document to the end before ordering your parts!   # Train crossing (part 2) - Automated barrier For the barriers I try to make my own, but soon found myself with no acceptable product, so I bought myself a already finished product from Auhagen ( https://www.auhagen-shop.de ) and Modelismo Artesana l ( https://www.modelismoartesanal.pt/ ). Noch ( https://www.noch.com ) and Busch ( https://www.busch-model.info/ ) has some pretty good finishes but weren't available at the time.   From Auhagen   from Noch from Busch from Modelismo Artesanal From finished product I could get wight into business. But first the material I needed. Material: 9g servos * 2x micro servos - don't buy continuous rotating servo, just standard 180ยบ servos. I bough SG90 servos but latter I found that actuall...