stevenvar / OMicroB

An OCaml generic virtual machine for microcontrollers
Other
138 stars 23 forks source link

Added a LiquidCrystal library to stdlib #7

Closed Vertmo closed 6 years ago

Vertmo commented 6 years ago

Implemented the LiquidCrystal library in OCaml. This library (described here) can be used with LCd screens based on the Hitachi HD44780 chipset. The library is implemented in the module LiquidCrystal, which I added to the stdlib. The function names are the same as in OMicroB, except for begin which becomes lcdBegin, and for the constructor LiquidCrystal which becomes either create4bitmode or create8bitmode. All functions take an object of type lcd as a parameter (rather than using a lcd class), followed by the same parameters as in the C library. I also added an exemple (tuto_7_liquidcrystal) which shows the basis of how to write on the screen.