{"id":18793693,"url":"https://github.com/seanmlyons22/cube8","last_synced_at":"2025-12-29T03:30:14.995Z","repository":{"id":177690919,"uuid":"325318498","full_name":"seanmlyons22/cube8","owner":"seanmlyons22","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-27T19:57:12.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T16:45:45.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seanmlyons22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-29T15:14:57.000Z","updated_at":"2022-12-27T19:57:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"77dbd6a0-260c-4331-bc64-7edf3e01121d","html_url":"https://github.com/seanmlyons22/cube8","commit_stats":null,"previous_names":["seanmlyons22/cube8"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmlyons22%2Fcube8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmlyons22%2Fcube8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmlyons22%2Fcube8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmlyons22%2Fcube8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanmlyons22","download_url":"https://codeload.github.com/seanmlyons22/cube8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239718425,"owners_count":19685725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T21:26:14.997Z","updated_at":"2025-12-29T03:30:14.949Z","avatar_url":"https://github.com/seanmlyons22.png","language":"C","readme":"LED Cube\n========\n\nThis readme explains how to setup the development environment for the LED cube.\nFurthermore, it explains how to build and deploy binaries for the LED cube.\n\nInspiration\n-----------\n\nThis project is based on and inspired by `chr`'s\n[LED Cube 8x8x8](https://www.instructables.com/Led-Cube-8x8x8/). I started this\nproject when I was a university student learning electronics. The intent was to\ncopy `chr`'s work verbatim as I did not yet fully understand all the concepts.\n\nAs a busy student, it took around 4 years to complete the build. This is\nbecause I really only worked on it during school holidays.\nI learned a lot from  this project.\nIt flexed by my theoretical and practical knowledge of embedded programming and\nelectronics.\n\nNow, I hope to give back to the project by coming up with some interesting\nmodifications and sharing them with the community.\n\n\nEnvironment\n-----------\n\nThe development environment is listed below. While the instructions are written\nfor macOS, they should also easily be adaptable to Linux or (maybe) Windows.\n\n\n - OS: macOS 11.1 20C69 x86_64\n - Host: MacBookPro11,4\n - Kernel: 20.2.0\n - Shell: zsh 5.7.1\n - Terminal: iTerm2\n\n\nHardware Modifications\n----------------------\n\nNote that I have swapped out the `atmega32` for a `atmega324pa` since I already\nhave one from a previous project.\n\n\nPrerequisites\n-------------\n\nSince I am developing on a mac, I will use homebrew to install the dependencies\nneeded to compile the AVR firmware and load binaries.\n\nTwo things are needed:\n\n - [avr-gcc](https://github.com/osx-cross/homebrew-avr)\n - [avrdude](https://formulae.brew.sh/formula/avrdude)\n\n\nThe AVR GCC compiler is used to compile the firmware and avrdude is used\nas a flash programmer.\n\nYou should also have a working LED cube.\n\n\nCompiling\n---------\n\nThe cube firmware is built using make, there is a makefile in the root\ndirectory. Some build goals are listed at the top of the file. Most common is:\n\n        make all\n\n\nTo clean the generated object files:\n\n\n        make clean\n\n\nFlashing\n--------\n\navrdude is responsible for flashing the device.\nThe ISP is the [usbtiny](https://www.sparkfun.com/products/9825) by sparkfun.\n\nTo program the board using the USB tiny, run the following command:\n\n        avrdude -c usbtiny -p m324pa -B 1 -U flash:w:Main.hex\n\n\nYou can also run the make goal\n\n        make program\n\n\nTest Program\n------------\n\nThere is a small program to test the LED cube in the `test` folder.\nIt can be built with make and is useful for debugging dead LEDs or broken\nconnections within the cube.\n\n\nHardware Design\n===============\n\nIn order to reduce the number of ICs and IOs needed by the LED cube, the latch\nboard will be replaced by a CPLD. The CPLD selected was an Altera (now Intel)\nMax II device. It will serve as an IO expander and perform all the logic that\nthe multiplexer board in the original design did.\n\n\nSource and project files for the CPLD are found in the `hdl` folder.\nSince CPLD development is only supported under Linux, I used a VM. The VM is\nmanaged and provisioned using the following software\n\n - VirtualBox\n - Vagrant\n - Ansible\n\nPrerequisites\n-------------\n\nThe following steps are needed to setup the host machine:\n\n 1. Install [virtualbox](https://www.virtualbox.org/wiki/Downloads)\n 1. On macOS make sure to give proper permissions:\n\n   - settings \u003e security \u0026 privacy \u003e privacy \u003e Accessibility\n   - settings \u003e security \u0026 privacy \u003e privacy \u003e Input Monitoring\n\n   Note: when first installing virtualbox there will be a popup asking to give\n   it permissions, this can be found at settings \u003e security \u0026 privacy \u003e general\n   **Make sure this succeeds**, virtualbox will not work without it\n\n 1. Install vagrant using homebrew `brew install --cask vagrant`\n\n\nRunning VM\n----------\n\nThe VM can be accessed using the following commands:\n\n 1. `vagrant up`\n 1. `vagrant ssh`\n 1. (in VM terminal) `sudo startx`\n\n  - This starts the graphical environment\n 1. Quartus can be run by executing `/opt/intelFPGA/quartus/bin/quartus`\n\n\nOn the first run, vagrant up can take quite a long time. This is because\nAnsible is provisioning the machine. This includes installing quartus and all\nits dependencies. Special thanks to\n[Embida](https://github.com/Embida/quartus-docker/blob/master/playbook.yml),\nwhose playbook I copied from to get started.\n\n\n\nWhy Vagrant?\n------------\n\nUSB support. Docker is a great tool for many projects, but on macOS hosts,\nVagrant offers much more seamless USB support. USB is needed to control the\nUSB Blaster that programs the CPLD.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanmlyons22%2Fcube8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanmlyons22%2Fcube8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanmlyons22%2Fcube8/lists"}