Rāda ziņas ar etiķeti games. Rādīt visas ziņas
Rāda ziņas ar etiķeti games. Rādīt visas ziņas

2019-02-18

555 timer examples in falstad circuits

Few 555 timer chip examples built digitally in falstad circuit builder.

This one is Schmitt trigger with 2/3 and 1/3 Vcc hysteresis.
Check out extra sliders and see how current through led changes.

Simulation is here - http://tinyurl.com/y4rnjs4o


Another one - LDR logic board. Similar, but without hysteresis as threshold pin is connected to stationary 10k resistor, so the output is passed on at strict threshold level chosen by adjusting the variable resistor.

And the simulation - http://tinyurl.com/y6l7blt2


Here is a monostable circuit. Use switch as a push button and the LED will stay turned on for a certain time.

http://tinyurl.com/y6o47oxw

2011-11-24

Find the treasure

My girlfriend is making  treasure lists all the time in the etsy.com, art shop. I made a treasure hunting game... in the Python, as the third step learning it.
The aim is to get the treasure with no going on the same cells second time. There are three intuitive parts how this game is structured. The first part is - to generate the 2D grid and put the player and the treasure somewhere on it. And here comes the first "but" - as the placements are generated randomly, it is possible, that as game starts, it ends because of possibility that the start locations of the treasure and the player are identical. To avoid it, the coordinates has to be checked, and if they are identical, the player placement is regenerated and again checked in while loop.
The next part is - moves. As the grid is discrete with it`s borders, the player generated moves has to be verified - are they allowed. There are four possible movements - wasd - and each are verified.
And the last part is to verify does the player get the treasure or - are the coordinates not used before.

Check the source code here