{"id":13780576,"url":"https://github.com/geekscape/aiko_engine","last_synced_at":"2026-03-15T03:18:54.783Z","repository":{"id":25203579,"uuid":"28627395","full_name":"geekscape/aiko_engine","owner":"geekscape","description":"Embedded Lisp interpreter for distributed message handling","archived":false,"fork":false,"pushed_at":"2018-12-09T01:26:59.000Z","size":384,"stargazers_count":10,"open_issues_count":3,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-03T18:15:13.611Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geekscape.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-30T10:50:26.000Z","updated_at":"2021-10-28T09:11:25.000Z","dependencies_parsed_at":"2022-08-23T19:50:54.444Z","dependency_job_id":null,"html_url":"https://github.com/geekscape/aiko_engine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekscape%2Faiko_engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekscape%2Faiko_engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekscape%2Faiko_engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekscape%2Faiko_engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geekscape","download_url":"https://codeload.github.com/geekscape/aiko_engine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225056842,"owners_count":17414221,"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-08-03T18:01:17.410Z","updated_at":"2025-12-18T04:25:11.716Z","avatar_url":"https://github.com/geekscape.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"Aiko Engine\n===========\n\nContents\n--------\n- [Overview](#overview)\n- [Unix: Build examples](#unix_build)\n- [Interactive session (LISP REPL)](#lisp_repl)\n- [ESP8266: Preparation](#esp8266_preparation)\n- [ESP8266: Flashing pre-built firmware](#esp8266_flash)\n- [ESP8266: Configuring Wi-Fi credentials](#esp8266_configure)\n- [ESP8266: Build firmware on Linux](#esp8266_build)\n- [Resources](#resources)\n\nPages\n-----\n- [Contributors](Contributors.md)\n- [Software license](License)\n\n\u003ca name=\"overview\" /\u003e\n\nOverview\n--------\nThe Aiko Engine provides ...\n\n- Cross-platform framework and implementation for ESP8266 and Unix\n- Abstractions for event handling, networking, persistence, timers\n- Lisp scripting\n\n\u003ca name=\"unix_build\" /\u003e\n\nUnix: Build examples\n--------------------\nTo build the various [Unix examples](examples/unix),\nin the top-level directory on either Linux or Mac OS X, type ...\n\n        make\n\n\u003ca name=\"lisp_repl\" /\u003e\n\nInteractive session (LISP REPL)\n-------------------------------\nExamples, particularly the\n[aiko\\_server](https://github.com/geekscape/aiko_engine/blob/master/examples/unix/aiko_server.c),\nmay include the\n[embedded LISP engine](https://github.com/geekscape/aiko_engine/tree/master/src/common/lisp).\n\nThis provides an interactive Read-Eval-Print-Loop\n(aka [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop))\ntypically accessible via the serial console or over a UDP socket.\n\nThe core LISP engine implements a\n[minimal set of primitives](http://ep.yimg.com/ty/cdn/paulgraham/jmc.lisp):\ncar, cdr, cons, equal, atom, cond, lamdba, label, quote\n\nAdditional primitives have been provided ...\n\n        (addTimer PERIOD COUNT)\n        (debug)\n        (load)\n        (save)\n        (wifi (SSID PASSWORD))\n\nCurrently, the REPL output only appears on the serial console.\nSerial console input is not echoed (awkward to use),\nso using UDP messages is recommended ...\n\n        nc -u ESP8266_IP_ADDRESS 4149\n        (13:hello world !)\n\nThe REPL expects LISP input formatted as\n[Canonical S-expressions](https://en.wikipedia.org/wiki/Canonical_S-expressions)\n\nExamples ...\n\n        6:anAtom                    ;; LISP atom (or symbol)\n        (4:this2:is1:a4:list)       ;; Simple LISP list containing 4 tokens\n        (8:addTimer)                ;; Fire a single timer after 1 second\n        (8:addTimer4:2000)          ;; Fire a single timer after 2 seconds\n        (8:addTimer4:20001:4)       ;; Fire a timer every 2 seconds, 4 times\n        (5:debug)                   ;; Toggle debugging information\n        (4:load)                    ;; Store configuration parameters\n        (4:save)                    ;; Restore configuration parameters\n        (4:wifi(4:ssid8:password))  ;; Set Wi-Fi Access Point credentials\n\n\u003ca name=\"esp8266_preparation\" /\u003e\n\nESP8266: Preparation\n--------------------\n- Acquire USB Serial adapter for flashing firmware / serial console\n  - Note: Voltage needs to match that required for your ESP8266 hardware\n\n        git clone https://github.com/geekscape/aiko_engine.git\n        cd aiko_engine\n        git submodule update --init\n\n- __Mac OS X or Linux:__ sudo pip install pyserial\n- __Windows:__ Acquire\n[nodemcu-flasher](https://github.com/nodemcu/nodemcu-flasher)\n\n\u003ca name=\"esp8266_flash\" /\u003e\n\nESP8266: Flashing pre-built firmware\n------------------------------------\nMilestone releases will be pre-built and placed in the _firmware/_ directory.\nEither _esptool_ (Mac OS X or Linux) or _nodemcu\\_flasher_ (Windows) can be\nused to flash the firmware binaries to the ESP8266 SoC.\n\n- Prepare ESP8266 SoC, place into bootloader mode ...\n\n        Power off or hold [Reset] button\n        Press and hold [Flash firmware] button (GPIO0 held low)\n        Power on or release [Reset] button\n        Release [Flash firmware] button\n\n- Using _esptool_ in the top-level directory ...\n\n        make SERIAL_PORT=/dev/tty.xxxx flash\n\n- Successful firmware upgrade looks like ...\n\n        Connecting...\n        Erasing flash...\n        Writing at 0x00008000... (100 %)\n        Erasing flash...\n        Writing at 0x0006bc00... (100 %)\n        Leaving...\n\n\u003ca name=\"esp8266_configure\" /\u003e\n\nESP8266: Configuring Wi-Fi credentials\n--------------------------------------\n- In the top-level directory ...\n\n        make configure_wifi\n\n- Connect desktop computer to ESP8266 SoC Wi-Fi Soft Access Point\n  - ESP8266 SoC Wi-Fi SSID will look like _ESP\\_xxxxxx_\n\n- Then type ...\n\n        ./configure_wifi WIFI_SSID WIFI_PASSWORD\n\n  - Where the parameters are for your Wi-Fi Access Point\n  - __Caution: currently the Wi-Fi credentials are sent in plain-text (UNSECURE)__\n\n\u003ca name=\"esp8266_build\" /\u003e\n\nBuild: ESP8266 firmware on Linux\n--------------------------------\nTo build the various [ESP8266 examples](examples/esp8266),\nthe ESP8266 cross-compiler development environment must installed.\nPresently, that is only supported on Linux.  If you use Mac OS X or\nWindows, then your best option is to install Ubuntu on a Virtual Machine.\n\nNote: Currently, the Aiko Engine works on ESP8266 SDK 1.2.0, but not 1.3.0.\n\n- Install Ubuntu VM\n- Install ansible on your local host\n  - brew install ansible ssh-copy-id\n  - ssh-copy-id USERNAME@HOSTNAME\\_VM\n- git clone https://github.com/wolfeidau/ansible-esp8266-role\n- cd ansible-esp8266-role\n- vi inventory\\_HOSTNAME\\_VM\n\n        [HOSTNAME_VM]\n        HOSTNAME_VM.local ansible_ssh_user=USERNAME ask_pass=True\n\n- cp playbook.yml playbook\\_HOSTNAME\\_VM.yml\n- vi playbook\\_HOSTNAME\\_VM.yml\n\n        ---\n        - name: Test the ESP8266 role\n          hosts: all\n          sudo: yes\n          tasks:\n            - include: \"tasks/main.yml\" \n              vars:\n                deploy_user: USERNAME \n                esp_iot_sdk_archive_url: \"http://bbs.espressif.com/download/file.php?id=564\u0026sid=b012c7cc3f156b4a934c60f8275afc7a\"\n                esp_iot_sdk: \"esp_iot_sdk_v1.2.0_15_07_03.zip\"\n                esp_iot_sdk_path: \"esp_iot_sdk_v1.2.0\"\n\n- ansible-playbook -i inventory\\_HOSTNAME\\_VM.yml playbook.HOSTNAME\\_VM.yml --ask-sudo-pass --check\n\nIf the _ansible-playbook_ dry-run works, then you can do it for real ...\n\n- ansible-playbook -i inventory\\_HOSTNAME\\_VM.yml playbook.HOSTNAME\\_VM.yml --ask-sudo-pass\n\nNow that the ESP8266 cross-compiler development environment is installed,\nyou can login to your Ubuntu VM and update your executable PATH ...\n\n- vi /etc/profile.d/esp8266.sh \n\n        export PATH=/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin:$PATH\n\nBuilding and flashing the ESP8266 firmware on your Ubuntu VM ...\n\n        git clone https://github.com/geekscape/aiko_engine.git\n        cd aiko_engine\n        git submodule update --init\n        cd examples/esp8266/aiko_server\n        make\n        make flash\n\nThe final step assumes that you have your USB-serial adapter connected as\n_/dev/ttyUSB0_ and you've pressed the [Reset] and [Flash] buttons correctly.\n\nFurther details on the [ESP8266 firmware flash procedure](#esp8266_flash)\nand [ESP8266 Wi-Fi configuration](esp8266_configure) are above.\n\n\u003ca name=\"resources\" /\u003e\n\nResources\n---------\nWorkshops ...\n\n- [ESP8266 Workshops](https://github.com/geekscape/nodemcu_esp8266)\n\nAssociated open-source ESP8266 hardware ...\n\n- [MeshThing](http://www.m9design.co) by m9design\n- [John Spencer's](https://twitter.com/mage0r)\n  [ESPkit-01 circuit board](https://github.com/mage0r/ESPkit-01)\n- [Mark Wolfe's](https://twitter.com/wolfeidau)\n  [Basic ESP board](https://github.com/wolfeidau/basic_esp_board)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekscape%2Faiko_engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekscape%2Faiko_engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekscape%2Faiko_engine/lists"}