Browse Search Popular Register Upload Rules User list Login:
Search:
7seg display v3

Image:
screenshot of the scene

Author: The Linkage

Group: Technical

Filesize: 30.15 kB

Date added: 2019-05-19

Rating: 6.1

Downloads: 2932

Views: 524

Comments: 3

Ratings: 3

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

TL/DR: 7segment display that is less laggy than others, if used with a low refresh rate (say, 10fps).

----------------------------------------------------
-------------------------------------------------------------
-------------------
my take on the 7segment, done entirely with entityByGeomID calls. This makes it so that every screen refresh is more CPU intensive than a normal 7seg made with tons of variables, but it idles completely when not refreshing (i.e. zero code runs when the number is static) making it lag-less between refreshes.

It is a complete mess... :lol:

Only supports positive numbers for now, but it can accept ints and floats. might make it support negatives later.

To reduce the number of displays (i.e. make it a 2 digit screen) delete the digits from the RIGHT, and then modify the variable "_amountOfDisplays" in the dark red box.

You can hide the fixjoints if you want, they are barely visible to show how the thing works.



To write to it, you have to call _writeToDisplay(n) where n is the number you want to write. so, from a laser it'd be

onHitByLaser = (e)=>{ e.geom.writeToDisplay(12.34) }

or, if you prefer suffering and want to use the same lagless transfer method, it's a little bit more complicated - with an axle's (or fixjoint's) onSpawn, write the dark red box geomID to the object from which you want to control the screen, then use entityByGeomID sporadically to write stuff to the screen


----------------------------------------------------
-------------------------------------------------------------
-------------------

Fixed some edge cases (ints ending in one or more zeros)
Got rid of some unused local vars and leftover debugging stuff

Now displays negative values too
Last edited at 2019/07/08 15:27:40 by The Linkage
Please log in to rate this scene
edit
Similar scenes
Title: Laser 7seg display Beta
Rating: 5
Filesize: 489.57 kB
Downloads: 726
Comments: 1
Ratings: 1
Date added: 2009/09/03 19:45:48
Made with: Algodoo before v1.8.5
Rating: rated 5
download
Title: LCD Display
Rating: 5
Filesize: 71.64 kB
Downloads: 605
Comments: 0
Ratings: 1
Date added: 2012/06/04 11:20:53
Made with: Algodoo v2.0.1 Edu
Rating: rated 5
download
Title: full adder with 7 segment display
Rating: 5
Filesize: 148.43 kB
Downloads: 999
Comments: 0
Ratings: 1
Date added: 2016/01/24 01:15:11
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Seven Seg Display + VFD Mockup
Rating: 5.625
Filesize: 307.32 kB
Downloads: 1449
Comments: 1
Ratings: 2
Date added: 2023/03/05 03:33:28
Made with: Algodoo v2.1.3
Rating: rated 5.6
download
Title: Laser circuit
Rating: 5.625
Filesize: 435.37 kB
Downloads: 2625
Comments: 2
Ratings: 2
Date added: 2009/09/03 20:06:04
Made with: Algodoo before v1.8.5
Rating: rated 5.6
download
Title: 168558_Gear_7_9-segment display
Rating: 5.1111
Filesize: 44.05 kB
Downloads: 2417
Comments: 2
Ratings: 3
Date added: 2017/09/12 19:12:55
Made with: Algodoo v2.1.0
Rating: rated 5.1
download
_writeToDisplay(1000) displays 1
it's fixed. Do tell me if you find any other error
Cool! :tup: