$ 1 32 0.00390625 0 5 50 Auto 2048 2048 true 315 736 320 736 384 4096 static%20int%20middle_w%20%3D%200%3B%0Astatic%20int%20middle_h%20%3D%200%3B%0A%0Avoid%20setup%28%29%20%7B%0A%20%20%20%20chipName%28%2274LS04%22%29%3B%0A%20%20%20%20logicFamily%28TTL%29%3B%0A%20%20%20%20pin%281%2C%20%221A%22%29%3B%0A%20%20%20%20pin%282%2C%20%22Y1%22%2C%20OUTPUT%29%3B%0A%20%20%20%20pin%283%2C%20%222A%22%29%3B%0A%20%20%20%20pin%284%2C%20%22Y2%22%2C%20OUTPUT%29%3B%0A%20%20%20%20pin%285%2C%20%223A%22%29%3B%0A%20%20%20%20pin%286%2C%20%22Y3%22%2C%20OUTPUT%29%3B%0A%20%20%20%20pin%287%2C%20%22GND%22%2C%20GROUND%29%3B%0A%20%20%20%20pin%288%2C%20%22Y4%22%2C%20OUTPUT%29%3B%0A%20%20%20%20pin%289%2C%20%224A%22%29%3B%0A%20%20%20%20pin%2810%2C%20%22Y5%22%2C%20OUTPUT%29%3B%0A%20%20%20%20pin%2811%2C%20%225A%22%29%3B%0A%20%20%20%20pin%2812%2C%20%22Y6%22%2C%20OUTPUT%29%3B%0A%20%20%20%20pin%2813%2C%20%226A%22%29%3B%0A%20%20%20%20pin%2814%2C%20%22VCC%22%2C%20POWER%29%3B%0A%7D%0A%0Astatic%20bool%20a%5B6%5D%3B%0A%0Avoid%20loop%28%29%20%7B%0A%20%20%20%20%2F%2F%20Read%20the%20first%20input%20pin%0A%20%20%20%20a%5B0%5D%20%3D%20digitalRead%281%29%3B%0A%20%20%20%20%2F%2F%20Write%20the%20negation%20of%20the%20first%20input%20pin%20to%20the%20first%20output%20pin%0A%20%20%20%20digitalWrite%282%2C%20%21a%5B0%5D%29%3B%0A%0A%20%20%20%20%2F%2F%20Repeat%20the%20logic%20for%20the%20remaining%20pins%0A%20%20%20%20a%5B1%5D%20%3D%20digitalRead%283%29%3B%0A%20%20%20%20digitalWrite%284%2C%20%21a%5B1%5D%29%3B%0A%20%20%20%20%0A%20%20%20%20a%5B2%5D%20%3D%20digitalRead%285%29%3B%0A%20%20%20%20digitalWrite%286%2C%20%21a%5B2%5D%29%3B%0A%0A%20%20%20%20a%5B3%5D%20%3D%20digitalRead%289%29%3B%0A%20%20%20%20digitalWrite%288%2C%20%21a%5B3%5D%29%3B%0A%20%20%20%20%0A%20%20%20%20a%5B4%5D%20%3D%20digitalRead%2811%29%3B%0A%20%20%20%20digitalWrite%2810%2C%20%21a%5B4%5D%29%3B%0A%0A%20%20%20%20a%5B5%5D%20%3D%20digitalRead%2813%29%3B%0A%20%20%20%20digitalWrite%2812%2C%20%21a%5B5%5D%29%3B%0A%7D%0A%0A%23define%20RED%20255%2C%200%2C%200%0A%23define%20GREEN%200%2C%20255%2C%200%0A%0A%2F%2F%20Define%20the%20draw%20function%0Avoid%20draw%28%29%7B%0A%20%20%20%20%2F%2F%20Left%0A%20%20%20%20%2F%2F%20Loop%20through%20each%20buffer%20symbol%0A%20%20%20%20for%20%28int%20i%20%3D%200%3B%20i%20%3C%203%3B%20i%2B%2B%29%20%7B%0A%20%20%20%20%20%20%20%20int%20y_offset%20%3D%2065%20%2A%20i%20%2B%2015%3B%20%20%2F%2F%20Vertical%20position%20offset%20for%20each%20symbol%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Post%201%0A%20%20%20%20%20%20%20%20drawLine%2826%2C%20y_offset%2C%2035%2C%20y_offset%29%3B%0A%20%20%20%20%20%20%20%20drawLine%2835%2C%20y_offset%2C%2035%2C%20y_offset%20%2B%207%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Post%202%0A%20%20%20%20%20%20%20%20drawLine%2826%2C%20y_offset%20%2B%2033%2C%2035%2C%20y_offset%20%2B%2033%29%3B%0A%20%20%20%20%20%20%20%20drawLine%2835%2C%20y_offset%20%2B%2033%2C%2035%2C%20y_offset%20%2B%2027%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Triangle%0A%20%20%20%20%20%20%20%20drawTriangle%2828%2C%20y_offset%20%2B%206%2C%2042%2C%20y_offset%20%2B%206%2C%2035%2C%20y_offset%20%2B%2020%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Set%20color%20based%20on%20a%20values%20%28a1%2C%20a2%2C%20a3%29%C2%BF%0A%20%20%20%20%20%20%20%20if%20%28%21a%5Bi%5D%29%0A%20%20%20%20%20%20%20%20%20%20%20%20setColor%28GREEN%29%3B%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%20%20%20%20setColor%28RED%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Fill%0A%20%20%20%20%20%20%20%20fillTriangle%2830%2C%20y_offset%20%2B%207%2C%2040%2C%20y_offset%20%2B%207%2C%2035%2C%20y_offset%20%2B%2018%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Reset%20the%20color%0A%20%20%20%20%20%20%20%20setDefaultColor%28%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Dot%0A%20%20%20%20%20%20%20%20drawCircle%2835%2C%20y_offset%20%2B%2023%2C%202%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F%2F%20Right%20Side%0A%20%20%20%20%2F%2F%20Loop%20through%20each%20buffer%20symbol%0A%20%20%20%20int%20offset%20%3D%200%3B%0A%20%20%20%20for%20%28int%20i%20%3D%200%3B%20i%20%3C%203%3B%20i%2B%2B%29%20%7B%0A%20%20%20%20%20%20%20%20int%20y_offset%20%3D%2064%20%2A%20i%20%2B%2048%3B%20%20%2F%2F%20Vertical%20position%20offset%20for%20each%20symbol%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Post%201%0A%20%20%20%20%20%20%20%20drawLine%2868%2C%20y_offset%2C%2059%2C%20y_offset%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20x%2C%20y%20-%3E%20x%2C%20y%20for%20Post%201%0A%20%20%20%20%20%20%20%20drawLine%2859%2C%20y_offset%2C%2059%2C%20y_offset%20%2B%206%29%3B%20%20%20%20%20%20%20%20%2F%2F%20Vertical%20line%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Post%202%0A%20%20%20%20%20%20%20%20drawLine%2868%2C%20y_offset%20%2B%2033%2C%2059%2C%20y_offset%20%2B%2033%29%3B%20%20%2F%2F%20x%2C%20y%20-%3E%20x%2C%20y%20for%20Post%202%0A%20%20%20%20%20%20%20%20drawLine%2859%2C%20y_offset%20%2B%2033%2C%2059%2C%20y_offset%20%2B%2027%29%3B%20%20%2F%2F%20Vertical%20line%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Triangle%0A%20%20%20%20%20%20%20%20drawTriangle%2853%2C%20y_offset%20%2B%206%2C%2065%2C%20y_offset%20%2B%206%2C%2059%2C%20y_offset%20%2B%2021%29%3B%20%20%2F%2F%20Coordinates%20for%20the%20triangle%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Set%20color%20based%20on%20a_values%5Bi%5D%0A%20%20%20%20%20%20%20%20%2F%2F%20--%3E%20First%20iter%3A%20target%20index%20%3D%205%2C%20i%20%3D%200%2C%20constant%20%3D%205%2C%20offset%20%3D%200%0A%20%20%20%20%20%20%20%20%2F%2F%20--%3E%20Second%20iter%3A%20target%20index%20%3D%204%2C%20i%20%3D%201%2C%20constant%20%3D%205%2C%20offset%20%3D%202%0A%20%20%20%20%20%20%20%20%2F%2F%20--%3E%20Third%20iter%3A%20target%20index%20%3D%203%2C%20i%20%3D%202%2C%20constant%20%3D%205%2C%20offset%20%3D%204%0A%20%20%20%20%20%20%20%20if%20%28%21a%5Bi%20%2B%205%20-%20offset%5D%29%0A%20%20%20%20%20%20%20%20%20%20%20%20setColor%28GREEN%29%3B%0A%20%20%20%20%20%20%20%20else%0A%20%20%20%20%20%20%20%20%20%20%20%20setColor%28RED%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Fill%0A%20%20%20%20%20%20%20%20fillTriangle%2854%2C%20y_offset%20%2B%207%2C%2064%2C%20y_offset%20%2B%207%2C%2059%2C%20y_offset%20%2B%2019%29%3B%20%20%2F%2F%20Filled%20triangle%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Reset%20the%20color%0A%20%20%20%20%20%20%20%20setDefaultColor%28%29%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Draw%20Dot%0A%20%20%20%20%20%20%20%20drawCircle%2859%2C%20y_offset%20%2B%2023%2C%202%29%3B%20%20%2F%2F%20Circle%20at%20the%20base%20of%20the%20symbol%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Update%20the%20offset%0A%20%20%20%20%20%20%20%20offset%20%2B%3D%202%3B%0A%20%20%20%20%7D%0A%7D 14 3pooch Examples 1