My first version of this device was made in a hurry and I left some important things behind like retrieving Haikus txt from microSD card, integrating bmp frames, fonts management, on/off switch and a better looking 3d printed case.
So, here it is: Haiku Reader v2.0
It all started with a preposterous announcement by an Argentine government organism named INTI about the Lector Electrónico Argentino “made 100% with local electronic components” (which of course did not exist) INTI even used a Kindle Paperwhite picture with a photoshoped Argentine flag. Fortunately the announcement was just an announcement and not a huge scam. Then I’ve thought of making the eReader... like really, programming an Arduino MKR Zero, connecting eInk screen and all. That was the starting point for this Haiku Reader.
- Arduino MKR Zero: has enough power for bmps backgrounds and also microSD slot
- Waveshare 2, 9 eink display
- Dual button
- Toggle switch
- Some jumper cables
- 3.7v battery and TP 4056 or Arduino MKR Zero compatible LiIon battery with connector
- Custom 3d printed case (STL files available)
- 4 screws
Button 1 to GND and Arduino D11
Button 2 to GND and Arduino D12
Screen to VCC, GND to Arduino VCC and GND. BUSY -> Arduino D5, RST -> Arduino D6, DC -> Arduino D7, CS-> Arduino D4, CLK -> Arduino D9, DIN -> Arduino D8
Switch between battery GND and Arduino MKR GND
Loading haikusHaikus are not hardcoded anymore. You have to create one text file per Haiku starting with 1.txt, then 2.txt, etc and place them into a microSD card. Haiku Reader v2.0 will count the number of files in root folder, populate a maxfiles variable and then read one by one.
// routine to read Haikus from microSD card - Complete code ay Gitbuh
myFile = SD.open(String(currentFile)+".txt");
if (myFile) {
int index = 0;
char stringArray[size_of_myArray];
myHaiku="";
while ((next = myFile.read()) != -1)
{
char nextChar = (char) next;
if (nextChar == '\n')
{
// end of readed line
stringArray[index] = '\0';
for(int i = 0; i < index; i++) {myHaiku=myHaiku+stringArray[i];}
myHaiku=myHaiku+"\n"; // insert end of line
index = 0;
}
else
{
stringArray[index] = nextChar;
index += 1;
}
}
// close the file:
myFile.close();
Changing bamboo backgroundFor the next update I will addfonts and backgrounds configurable. At this time if you want to load your own background, use bmp 128x296 pixels 1 bit, load horizontal in LCD Assistant, load the array into screens.h file and showit with this line of code.
display.drawBitmap(0, 0, yourImageArrayHere, 128, 296, GxEPD_BLACK);
DemoInterested in other projects related to literature?https://www.instagram.com/ronibandini/
TikTok
https://www.tiktok.com/@ronibandini/video/7317425999354809605
Comments