• Some of the answers repeat @robin, some are different...

    • number of rollover switches: you need only one per lane where the ball passes. - In the 'old' electromechanical days, there was no software that did the job: it was stepping relays https://tuukan.fliput.net/emfix_en.html for a score wheel, or, when using horse thinghy with lights, you would (ab-)use a phone switch relays with 10 steps... or a plain rotary stepping switch... https://www.surplussales.com/Switches/SW­Ledex-1.html - and they needed the pulse(s)... ;-)

    • slow down game in end stretch: no problem, you just program it the way that after no matter what lane the ball exits, only one step is advanced... this is though not really working when you do not have a lane - or more than one - that does give no points what so ever!

    • cut and have wires instead of zig-zag and reverse programming: no point there! no efficiency what so ever... actually worse... because depending on length of the wires going back and the electro smog, the timing could get off... so no point there. @Gordon implemented the zig zag just for that this is not needed (not only for neopixel displays, but for others as well that are feed with a serially with a stream of bytes...). Therefore: zig-zag is the answer. - There may be a thing or two to consider though, such as how close he lanes are. To do the zig and the zag, you may cut and insert a short wires... I would though just go for 'ignoring' a pixel, since you have anyway plenty of them... and you loose only one per lane... and this is again just a matter of coding... (btw read up about the signal timing re-conditioning that each neopixel does for the next one!)

    • Espruino handling the number of players and lights - 18 x 30: Adding 2 more for the indication of the player at/for the ball and one for handling the zig zag without cutting: 30x20x3 bytes = 1800 bytes... 1.8KB ... and the rest is for the code... way manageable... I did not make a test of the memory consumption in the prototype... but I made the calc the very first time you came up with the game idea... it is not even worth to save a few bytes / cut out the pixels... it is just more work. Think of mapping and the algorithm that does it... exactly as the zig zag does it. Also the speed that things can happen: Espruino has a event queue and while a new 'board pattern' is pushed out. AIR, data is pushed out with something around 400KHz - it would take a string of 16K - 16,666 - sixteenthousandsixhundredandsixtysix (in check writing) - lights to eat up a second! - your 600 lights keep your Espruino exactly / about 36 ms busy... (I hope my math adds up...)

    • Power Supply: As with everything in Engineering, the answer is always: ...it all depends. Assuming that there are max 3 pixels lit per player and they would light all up - worst case - fully and white, this makes 3 (pixels) x 3 (LEDs - R, G and B each) x 18 (players) x 20ma (each LED) = 3x3x18x20 ma = 3240 ma = 3.240 A. Since not all LEDs in the Pixel are fully up at the same time because you want to have different colors, therefore you can go for half of that current. In other words, you a 5 volt power supply w/ 1.8..2A for the LEDs and paralleling feed lines. Feed lines are similar like done on overheads for tramways/trolley/trains along their route. Espruino drives only the first pixel's signal input. You just connect the Espruino board to that same 5 volt supply when running with both, 5V and Ground. At development, you run Espruino from USB, BUT you keepGROUNDs of Espruino and the pixel string connected. If you do not connect the GROUNDs, the control signal has no reference and is floating, and you lights go northern... --------- As said: it all depends. When you want to do some splashing with your board - and with 18x30 lights you really can put some text and light shows on - you need to severely rethink your power supply setup: 600x60ma = 36000ma = 36A... (@5V: 180W). Some old PC power supply or supplies joined - if joinable - may do that (Just checked: AT/ATX max Amps on 5 V is about 15A, not exactly enough for what you are looking for). For reliable results, go for something like 5V 40A, for example, https://www.jameco.com/z/RSP-200-5-MEAN-­WELL-200-Watt-Single-Output-Power-Supply­-with-PFC-Function-5-Volts-40-Amps_21739­33.html (I have no shares; I was just a googling for 5V 20A 200W single output power supply). NOTE: There are 5V and 12V versions of these 5050 or LED-like Neopixel strings. With 12 Volt, a bit less Amps / less thick line feed wires are required, but the Wattage stays the same. WS2812B - 5V - come in strings of 5M w/ 150 or 300 pixels (30 or 60 /m). You can also get wired ones, but they are much pricier.

    Challenge your students for alternative solution(s) in the software implementation (I'll dm u abt it).

    What I still do not properly understand is

    players are simultaneously playing

    Does that mean you have 18 pin ball machines?

    With 18 boards, you end up w/ 36..54 exit sensors. The Original Espruino board has 44 GPIOs that you can use as inputs. Alternative, you can use my interrupt enabling code for Port Expanders (which would actually be a motivation to finish that as a module. It is an enhanced version of the code of the existing one; see Exploring adding setWatch/clearWatch (interrupt handling) to MCP23017 (MCP2308) Port Expander Ports. Two of those chips can handle 32 inputs effortlessly, and need eat up only a few GPIOs of the Espruino, and offload a lot of work as well - as is described in related conversations (scanning key board / button entry matrix / switches / etc).

About

Avatar for allObjects @allObjects started