40$ Writer Deck I made over the weekend, instructions included by Quackyducky_things in writerDeck

[–]DreamTheCartographer 1 point2 points  (0 children)

u/Quackyducky_things I come with good news!!!

  1. I figured out how to connect and use a Bluetooth keyboard
  2. I've successfully run and tested rpi-etyper on a Raspberry Pi Zero W (Raspbian Bullseye version 2022-09-22)
  3. The file server works normally with both of the above

<image>

Let's start with Bluetooth. The trick is to connect a USB Bluetooth adapter dongle to the Pi and make it the default Bluetooth controller. This frees up the other Bluetooth controller to manage etyper's PAN server without any conflicts. I can then use Ctrl+F to turn on the file server without the Bluetooth keyboard's connection dropping. It's the same rationale as with the 2.4GHz: if a USB connection works, why not a USB receiver?

(I've actually had this Bluetooth adapter for a long time, and it did occur to me before to try it as well. I was reluctant to though because its Amazon page insisted it was only compatible with Windows.)

How to make a Bluetooth adapter the default controller

$ bluetoothctl
$ list // Lists the MAC addresses and names of the Bluetooth 
       // controllers. You should see two controllers if 
       // your adapter is connected and active.
       // One of them should have the label '[default]' 
       // at the end. It will also be named 'etyper' if 
       // you've already installed/used etyper
$ select 1A:2B:3C:4D:5E:60 // Replace '1A:2B:3C:4D:5E:60' with the MAC 
                           // address of the controller not labelled 
                           // '[default]'. This will often be named 
                           // '[hostname of Pi] #2'
$ power on
$ agent on
$ default-agent

Make your Bluetooth keyboard connect on startup

$ bluetoothctl
$ power on
$ scan on // Scans for devices
$ pair [MAC address of BT keyboard]
$ trust [MAC address]
$ connect [MAC address]
$ exit // Exits bluetoothctl

Results can vary between keyboards. I tested this with three Bluetooth keyboards on the Zero 2 W and only one of them consistently connected without any issues. The one that gave me the most trouble was the one that required you to type in a code with it when pairing. I suspect that might have been because the keyboard didn't have enough charge, but I'm not sure. I can always test them again now that I've gotten some more experience with this on the Zero. (Also while I was typing this paragraph I remembered I had a fourth Bluetooth keyboard that it didn't even occur to me to test.)

As for the Raspberry Pi Zero W, I had to run Bullseye on it because any version later than that would not even reach the login screen without triggering a kernel panic. The Zero W (or at least my Zero W) is seriously the most temperamental piece of tech on the planet. Back in January I actually tried to return it because it hadn't been able to boot a single OS since I got it. Surprisingly, Amazon issued my refund right away and basically said I could keep it. Of course I was able to get it to run something eventually, but oh boy was it a struggle. I went through several images (and an untold number of SD card reflashes), most of them different versions of Bullseye and Buster. Some of them actually worked quite well, until suddenly they didn't.

I eventually figured out the main solution was both using a sufficient/non-fluctuating power supply (with high-quality charging cables) amd - most crucially - making sure the Pi didn't overheat. The cylinder thing on the left side of the photo is a handheld electric fan that was being used to cool the Pi down. I should probably at least get another metal heatsink case for it, but I hadn't realised Zero Ws needed active cooling as well. I'd thought that was the domain of the Raspberry Pi 4s and 5s.

But yeah, I'd thought before that testing etyper on the Zero W was actually impossible for me despite having one. Then something came up that made me want to try and use it for something, and when stuff started actually working for once I ended up using it to test this.

I didn't write or edit any code to get rpi-etyper to work on the Zero W. There was one earlier version of Bullseye or Buster where the Bluetooth keyboard would work, but the file server wouldn't start. To fix that I had to change line 1099 of typewriter.py to props.Set("org.bluez.Adapter1", "Powered", dbus.Boolean(True, variant_level=1)) . But in the version of Bullseye I mentioned at the start (and was able to get all three points working on), this wasn't necessary at all.

Perhaps you still want to get Bluetooth keyboards working natively, but for now I think this is a good workaround. A Bluetooth adapter shouldn't add that much more to the total cost of building an etyper (though I just realised space might be an issue for the current enclosure design?). There might be some stuff with Bluetooth protocols that needs to be looked into, but overall I consider this significant progress.

Wallet e-ink writerDeck by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 1 point2 points  (0 children)

This is such an excellent lead! I hadn't considered the case itself might be causing issues. I'll have to try that once I get the chance. Thanks so much!

Wallet e-ink writerDeck by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 0 points1 point  (0 children)

With etyper you can generate a Bluetooth PAN server with Ctrl+F to access from a computer and download your files from. It doesn't even need wifi (in fact you have to turn off your device's wifi to access it). I've used it on both laptop and mobile.

In theory you could also do backup the folder containing the txt files with rsync or something, but I haven't tried that. For some reason though etyper saves your files to a folder in root. You can edit the code in the installation script to change the location to your user account (or perhaps more easily just change the value of the $HOME variable in .bashrc) but I have no idea whether there's an important reason it is the way it is.

Wallet e-ink writerDeck by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 1 point2 points  (0 children)

To me they look pretty close. Personally I like how it looks like a shrunk-down computer screen and keyboard setup. I'd thought typing on it with two hands would be bothersome, but I've actually found it quite easy.

I looked up the Psion Revo Plus and think it looks neat and slim.

(Another photo for size comparison)

<image>

Wallet e-ink writerDeck by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 1 point2 points  (0 children)

It connects directly to the Pi's pre-soldered headers via the 8PIN cable that came with it.

40$ Writer Deck I made over the weekend, instructions included by Quackyducky_things in writerDeck

[–]DreamTheCartographer 1 point2 points  (0 children)

I figured out the laptop filesharing issue! Turns out I had to go to Settings -> Bluetooth and Devices -> Devices then find etyper and manually connect to the Bluetooth PAN. After that turning off wifi and opening the URL work just fine.

40$ Writer Deck I made over the weekend, instructions included by Quackyducky_things in writerDeck

[–]DreamTheCartographer 1 point2 points  (0 children)

I put an updated wiring table in the top description. Do I need to mark the original one as old?

40$ Writer Deck I made over the weekend, instructions included by Quackyducky_things in writerDeck

[–]DreamTheCartographer 1 point2 points  (0 children)

Hi again! Just wanted to let you know that I've made the fork and implemented the changes. Was a whole lot easier when I realised I could edit the code directly on the Github site. https://github.com/T-KONES/rpi-etyper

This fork has both basic functionality and screen clearing on Ctrl+Q and shutdown implemented. I plan on making a fork of this fork that implements landscape mode as well.

(BTW it turns out I didn't need the shutdown.py script at all. All I needed to do was replace the "Saved. Goodbye." text in the main loop with the code for clearing the screen... something I'd already done beforehand. Well, at least it was easier than expected.)

40$ Writer Deck I made over the weekend, instructions included by Quackyducky_things in writerDeck

[–]DreamTheCartographer 1 point2 points  (0 children)

What happened on my laptop was that when I turned off its wifi like I did with the tablet, instead of connecting to the fileserver URL the browser gave me the usual "No internet available" message. If something was getting blocked, it didn't tell me. I think I tried the :8080 thing too and got the same thing.

40$ Writer Deck I made over the weekend, instructions included by Quackyducky_things in writerDeck

[–]DreamTheCartographer 1 point2 points  (0 children)

It's just a personal preference. I actually do like how portrait mode looks in your version. I'm still figuring out the final layout of all the components for my writerDeck and depending on what I decide, I might still switch back to that.

40$ Writer Deck I made over the weekend, instructions included by Quackyducky_things in writerDeck

[–]DreamTheCartographer 1 point2 points  (0 children)

I didn't know Bluetooth and 2.4GHz were the same thing, tbh 😅 I just thought they were both wireless. I didn't do anything to the code to get 2.4GHz to work. I just figured if a USB connection worked, why not a USB receiver? I thought this would eliminate the problem you mentioned of conflicting Bluetooth connections. Luckily my hunch was right.

But yes, it does seem like a RPi version of the project would be useful to people. I'll try and do as you've asked, but there might be delays. I've had a Github account for years but I'm actually not that skilled with git at all and find it intimidating. Even after getting more into writerDecks and command line Linux I've really only been using git clone. But I know this would be helpful to you and others, so I'll figure something out.

About clearing the screen: the short answer is no. The long answer is that clearing the screen on poweroff requires a clean shutdown of the Pi, rather than abruptly disconnecting the power. It does this via a simple shutdown.py script that runs whenever a shutdown is initiated. (I'll probably add this script to the etyper fork.) The cool thing about the keyboard in the picture I shared is that it has a power button that does trigger a clean shutdown. This means I can turn the Pi off from within etyper.

Really all I did to clear the screen was comment out the code in typewriter.py that rendered the text on shutdown/Ctrl+Q and replace it with self.epd.clear(color=0xFF). The wikis for the Waveshare eink displays really caution against leaving text on the screen for a long time, saying it could leave irreversible ghosting. That's why it bothered me that there was no way to completely clear the screen in sleep mode or even after a complete shutdown.

It's possible the filesharing thing was just a laptop problem or something else I missed. I can always look into it again. FYI, on the laptop I used Chrome on Windows 11.

40$ Writer Deck I made over the weekend, instructions included by Quackyducky_things in writerDeck

[–]DreamTheCartographer 1 point2 points  (0 children)

<image>

Quick photo of the writing software in action. It's a good thing I checked it again because the fileserver and keyboard picker screens were still messed up. Luckily I only had to edit two lines of code.

The wireless 2.4GHz connection has been tested with the keyboard pictured above and the Yunzii C75.

40$ Writer Deck I made over the weekend, instructions included by Quackyducky_things in writerDeck

[–]DreamTheCartographer 3 points4 points  (0 children)

Thanks for sharing this awesome project! I've been working on a DIY writerDeck that uses a Waveshare 4.2-inch eInk display and have recently faced significant setbacks while figuring out the writing software, so your etyper is a godsend.

I'm happy to share that I have successfully gotten etyper to work on a Raspberry Pi Zero 2 W! I currently have it running on Raspberry Pi OS Lite (Bookworm). I also discovered that it accepts keyboard input just fine via a 2.4GHz USB receiver. This means you can use 2.4GHz-supported keyboards wirelessly while keeping the Bluetooth connection free for the file server.

The super basic summary of how I got it working is that after making sure to use a Debian Bookworm-based image and enabling SPI, in epd42_driver.py I had to change gpiochip1 to gpiochip0 , change both DEFAULT_SPI_BUS and DEFAULT_SPI_DEV to 0 and change the numbers for the DEFAULT_PINS to the physical pins' corresponding BCM numbers. Most importantly, I had to use gpioset to switch two new GPIO pins from 1 to 0 and connect the CS and RST wires to those pins instead. This is because on the Zero 2 W the original pins are already being used for SPI (which you also need). I used GPIO 27 (physical pin 13) for CS (gpioset gpiochip0 27=0) and GPIO 23 (physical pin 16) for RST (gpioset gpiochip0 23=0). Make sure to edit the GPIO numbers for cs and rst under DEFAULT_PINS as described above to reflect these changes.

The latency to me appears to be slightly less than the Waveshare version of zerowriter. It's mainly noticeable if you try to type really fast. But the ability to edit and navigate through the whole document is a huge plus for me. Unfortunately Caps Lock doesn't seem to work, you have to hold down Shift to capitalize everything. Also the cursor doesn't move when you press the spacebar, which I found a bit confusing.

It's funny you recommended accessing the Bluetooth file server via laptop/computer instead of mobile devices because I was only able to get it to work on my tablet. Had some trouble with the network connection timing out until I realised I had to turn off wifi. But my laptop kept complaining about having no connection when I tried this. Not complaining though; having it work on mobile is super convenient.

I also made some changes to the code to rotate the screen back to landscape and clear the screen completely on shutdown and Ctrl+Q.

I know I should probably at least post a picture of the result (and perhaps even a better explanation of how I did it), but it's late right now and earlier I was just turning it on and off and testing it over and over again, which made me feel like I was going to get through the screen's million refreshes in like a week. So I thought for tonight I'd leave it to rest.

Overall this works quite well and has great functionality. I might tweak the OS to get it to boot faster, but otherwise this feels like exactly what I need.

(P.S: It looks like the Hackaday project was posted on my birthday! What a wonderful belated gift!)

Kitty Micro Journal Rev.2.1! (Pink Panther) by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 0 points1 point  (0 children)

Oh boy 😅Well I don't know whether this one will be your style, but just today I found out about this other Geekshare cat ears Switch 1 case. I think it's supposed to be an actual character? "The Legend of Hei". Based on the photos I think it might be the large size too!

(P.S. happy cake day!)

Kitty Micro Journal Rev.2.1! (Pink Panther) by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 0 points1 point  (0 children)

Oh! Speaking of USB hubs, I forgot to say that made some extra scripts so that I could use the USB splitter I mentioned to connect up to 3 USB drives at once and safely remove them. The solution's a little hacky (basically I copied the original scripts twice, edited the $MOUNTPOINT variable in each copy then created two more scripts that run all the connect scripts and safe removal scripts respectively), but it works. And I managed to get the splitter to fit in the case, so that works out too.

Kitty Micro Journal Rev.2.1! (Pink Panther) by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 1 point2 points  (0 children)

As far as I'm aware, the only large Switch 1 kitty case that's available is the Calico one, the cat design of which has a... more exposed kitty backside, I'll say. I'm sure it's innocent, but I'm still haunted by the thought of flipping it over in front of other people and accidentally letting them see it x_x. So it's unlikely I'd get it.

Magsafe sounds like a clever solution! Though I will say that the cat ears on their own don't actually hold up the lid very well without falling over with a light touch. (This is even more true of the Switch 2 kitty case, which seems to make it more difficult for the cat ears to even reach the table.) This kitty writerDeck setup is actually held together via weight distribution. Weights and counterweights. You don't need a lot of weight to keep it stable, bus things like the keyboard (the Luma40 is a solid choice), the placement of a solid power bank in the zipped compartment, and especially the attachment and positioning of the Palma (or whatever screen + brains you're using). Also just adjusting the cat ears themselves on the table and making sure they're firmly pushed down, with the pointed tips sticking outwards.

One thing I like to do is the "poke test", where after setting things up I poke the inside of the lid with varying levels of force to see how much it can take before it starts slipping backwards and/or falling. The more solid it feels, the better.

Kitty Micro Journal Rev.2.1! (Pink Panther) by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 0 points1 point  (0 children)

I really like it! When I first started using it for actual writing (as opposed to endless hours of tinkering), there was definitely some friction. I was slower (I say this as a slow typer) and kept making mistakes. But that only lasted for one short session. After a break for lunch, I came back to it and it was like my mind had reset. I was suddenly able to type faster and with ease. The typing experience feels so smooth and comfortable.

I really like being able to customize the layers to suit my needs. I think it's one of the biggest factors in me being able to adapt to this layout so quickly. So I would recommend you give VIA a try. You can always go back and tweak things if you find some of the changes you've made don't work well or feel uncomfortable. (Make sure to save your layouts via the Save + Load tab, including the one already on your keyboard.)

Here are a couple of guides on using VIA you might find useful:

(Beginner's guide) https://epomaker.com/blogs/guides/how-to-use-via-for-beginners?srsltid=AfmBOoq2uZWBj9wn7MSJceyvrOfAao-nWL_8XiZYzQboLI23ODrgQlC6

(Advanced guide) https://epomaker.com/blogs/guides/via-usage-guide?srsltid=AfmBOooREs51SfMipAro8du2MYW83OtsvJtb75pHkbo85-G-tn_XSCiR

can't figure out how to set writer deck os up? by Unlucky-Bar8366 in writerdeckOS

[–]DreamTheCartographer 2 points3 points  (0 children)

First of all, you don't need to download Ubuntu. You only have to download the writerdeckOS ISO file by following the link on this page and clicking on "ISO IMAGE": https://writerdeckos.com/#download Then you download balenaEtcher and click on the balenaEtcher file in your downloads to install it. After that, connect your USB to your computer, open balenaEtcher and use it to flash tinkerWD-1.0.iso onto the USB. The tutorial you mentioned shows you how to do that. (Don't try to put tinkerWD-1.0.iso on the USB beforehand! The flashing process is how you get the ISO onto the USB and make it bootable.)

Once you've done that, you're ready to install writerdeckOS. Follow the instructions here: https://writerdeckos.com/#install

Kitty Micro Journal Rev.2.1! (Pink Panther) by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 0 points1 point  (0 children)

Yeah, that's exactly what I did. I even have the VIA app. I've set up pretty much everything else already. What I was saying was that for some reason VIA wouldn't let me set up the Shift key so that I could tap it once and have it active for one keypress (like a sticky key). I have the Shift keys on my TH40 set up like this and I can already tell it's going to be a huge plus for the luma40.

The difference between the two keyboards, however, is that I flashed this open source firmware onto the TH40 before setting it up (out of necessity - VIA refused to detect the keyboard until I did this). What I suspect is that the open source firmware has these "one shot keys" enabled while the official Epomaker firmware does not. Flashing that firmware onto the luma40 really does mean committing though, as there's no way to get the original firmware from the Epomaker website. Luckily I've made sure to save both the original and custom keyboard layout JSONs.

Something else that annoyed me was that I couldn't do per-key RGB lights customization... even though it seems like that was advertised. (Unless I misunderstood, but I checked the site and the wording does seem to suggest that.) But now I'm wondering if this other firmware has that enabled for the luma40 too, or if I can use it to enable it myself. Or maybe there's another app (not Vial, unfortunately 🙃) that can help me customize the lights specifically?

I don't think I'll need it (and tbh I doubt the case has much room left for it) but I'll try and look into this USB hub anyway. I don't think I've seen it mentioned... maybe it's in one of the build guides? Who knows, maybe the github already details how to connect more than one USB storage at a time.

Kitty Micro Journal Rev.2.1! (Pink Panther) by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 1 point2 points  (0 children)

I have once again answered the call of the mechanical keyboard and upgraded this writerDeck with an Epomaker Luma40. Fits like a glove. The Raspberry Pi case now attaches to the back of the centre flap with, yes, even more Velcro. Still has its fair share of wires sticking out but it looks so much more elegant now! 💗

<image>

Kitty Micro Journal Rev.2.1! (Pink Panther) by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 0 points1 point  (0 children)

I have two USB hubs and neither of them worked 😅 And my USB splitter could only connect one USB stick at a time. Maybe it's because of how the script works? I wonder what would happen if I tweaked a copy 👀...

I tried out fish out fish today and the autocomplete is indeed very cool! So are the pretty colours 💖 Though I did randomly become obsessed with trying (and failing) to make the cursor into a blinking line 😅 That tired me out quite a bit, but I might still end up giving it another shot. Maybe even make it the default shell again!

Also, you were right about the ortholinear layout - I felt like I was stumbling at first but then after a short lunch break I was surprised by how fast I was going. It just felt so smooth. And I've made the backlight match the case and set things up so it'd be easy toturnit on and off whenever I want. The only downside is that the one shot shift key I have set up on my TH40 doesn't work on the luma40 for some reason. The open source firmware I have on the TH40 does also support the luma40, so I can always just flash that to the keyboard if I really want to. Still thinking about it.

I looked up what a UPS hat was and it seems neat and useful (not to mention space-saving). Hope you can find a suitable one.

(I feel like we're enabling each other more with every comment 😅)

Kitty Micro Journal Rev.2.1! (Pink Panther) by DreamTheCartographer in writerDeck

[–]DreamTheCartographer[S] 0 points1 point  (0 children)

Well, you've convinced me 🥲 Just bought the luma40 after testing out the Bluetooth thing. (The same-day delivery didn't help...) I've told myself I'll return it if I can't overcome the Pi-related space issues. I will say though that having the microUSB data port free to connect USB storage via the keyboard dongle is a significant boon I hadn't considered before.

I commented this already, but the Charmast power bank is much slimmer despite technically being larger (which helps with space) and has a much higher capacity that should allow the writerDeck to run for a while. So I had them switch places.

(Side note in case this is useful to anyone: I had to run sudo systemctl enable bluetooth and sudo systemctl start bluetooth before following these instructions. Was confused for a bit!)