your led cube
play

Your LED cube ENGR 40M Chuan-Zheng Lee Stanford University 28 - PowerPoint PPT Presentation

Your LED cube ENGR 40M Chuan-Zheng Lee Stanford University 28 July 2017 Electrically its an array, but physically How do we arrange these in a 4 4 4 cube? E July 28, 2017 ENGR 40M Summer 2017 C.Z. Lee, J. Plummer, R. Howe


  1. Your LED cube ENGR 40M Chuan-Zheng Lee Stanford University 28 July 2017

  2. Electrically it’s an array, but physically… How do we arrange these in a 4 × 4 × 4 cube? E July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 2

  3. …it’s a cube? E E July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 3

  4. …it’s a cube? second bottom from bottom E E second top from top July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 4

  5. Decomposition The main Arduino loop loop() calls Does one pass through the LEDs display() (time-division multiplexing) which calls Looks up the LED state associated with an getLEDState() anode/cathode pair July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 5

  6. Mapping between 2-D and 3-D E E y July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 6

  7. Mapping between 2-D and 3-D We want a function that maps from anode/cathode pairs 𝑏, 𝑑 (e.g. “ ”) to 3D coordinates 𝑦, 𝑧, 𝑨 y July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 7

  8. Mapping between 2-D and 3-D Anodes Cathodes y y July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 8

  9. Mapping between 2-D and 3-D Operations we might consider using: • * (multiplication) • % (modulo division) • / (integer division) • & (bitwise and) • | (bitwise or) y • ^ (bitwise xor) July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 9

  10. What do bitwise operations do? • Bitwise operations apply to ea each bit it in the binary representation of a number in indi divid idually Examples (in binary): 00110101 | 01100011 == 01110111 00110101 & 01100011 == 00100001 00110101 00110101 | 01100011 & 01100011 01110111 00100001 July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 10

  11. Mapping between 2-D and 3-D We want a function that maps from anode/cathode pairs 𝑏, 𝑑 (e.g. “ ”) to 3D coordinates 𝑦, 𝑧, 𝑨 y July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 11

  12. Mapping between 2-D and 3-D Anodes Cathodes y y July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 12

  13. Making the mapping function easier You can reorder the anodes/cathodes however you like. Would a different ordering make the relationship simpler? y y July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 13

  14. Mapping between 2-D and 3-D y July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 14

  15. Mapping between 2-D and 3-D y July 28, 2017 ENGR 40M Summer 2017 — C.Z. Lee, J. Plummer, R. Howe 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend