element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sci Fi Your Pi
  • Challenges & Projects
  • Design Challenges
  • Sci Fi Your Pi
  • More
  • Cancel
Sci Fi Your Pi
Blog I Ching Code Port
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: taodude
  • Date Created: 28 Apr 2015 10:27 PM Date Created
  • Views 529 views
  • Likes 1 like
  • Comments 0 comments
  • i_ching_hexagrams
Related
Recommended

I Ching Code Port

taodude
taodude
28 Apr 2015

I have not been idle.  Most of my work over the last few days has been planning and sorting the data models for the hexagrams.  However, i have been experimenting with bits of Python to produce the values that define the quantum states of each Hexagram line. and i have also been thinking about how best to display the results on the PiFace CAD display, and make good use of the navigation toggle and pushbuttons.  I might even use the IR sensor to read inputs from a remote control keypad.

 

I had intended to port the code from my Psion Organiser II LZ64 as the Hexagram generation engine, but the screen is only a bit larger at 20x4 characters than the PiFaceCAD 2 at 16x2 characters, and so is a nightmare to transcribe from.  Also, I lost the serial port connector ages ago, so i can't export the OPL source code files, and the 128k DataPaks have a proprietary interface.  To add to the mix, i am waiting for a couple of 32GB microDSs, so that i can try out a net installer without messing up the Raspbian NOOBS SD card that came with my RPi 2.

 

Here are some pix to show how the program output first looked when i wrote it in the late 1980s:

First a picture of the LZ64 for those who were in nappies when it came out image.

image

Next the power-on screen (note the vintage dot matrix LCD display).

image

The I Ching program is written in OPL, an interpreted language like Python and is invoked from the menu screen

image

Here is a sample hexagram output that i ran to show it still works:

image

The I Ching was conceived in ancient China as a Oracle, providing guidance in times of uncertainty.  Augury was widespread in the ancient world and the interpretation below should be taken in that context.  The Illuminatus books are a conspiracy theory comedy, written around the time that the world was on the brink of Armageddon.  Much as i would like to, I am not going to weigh down this Blog with loads Chinese philosophy, but a few snippets are unavoidable in order to understand the project.  Expect an eclectic mix of ancient and modern throughout this project.

 

The hexagram is split into Lower and Upper Trigrams to fit on the screen and both the 'Old' and 'New' Hexagrams are displayed.  The cast or 'Old' hexagram has a Lower Trigram Tui, 'The Lake' which represents the Joyous, and an Upper Trigram, Chen 'Thunder', which represents the arousing.  Together, they form Hexagram 54 - Kuei Mei 'The Marrying Maiden'  Chen also represents the Eldest Son and Tui the youngest daughter.  The hexagram cautions against supplanting the established order.

Changing lines in the second and fourth place advise now is not the time to act and counsel patience and holding true to the original idea you had.

The 'New Hexagram is Hexagram 24.  The Rock Band Pink Floyd wrote a song about this Hexagram and called it Chapter 24.  The Lyrics say: Change, Return, Success.  Going and coming without error. Action brings good fortune.  So it looks to beworthwhile waiting a bit rather than pushing ahead too quickly now.

 

That is my excuse and i am sticking to it.  This week i am busy, but next week i am at home on leave and so will make more progress image.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube