Octopi-with-lcd: Difference between revisions

From MalinWiKi
Jump to navigation Jump to search
(Created page with "= Raspberry pi with touchscreen and octoprint = I found an old el-cheapo LCD for [https://www.raspberrypi.org/ Raspberry Pi] with resitive touch, something like [https://www....")
 
No edit summary
Line 10: Line 10:
* Access to a PC and a SD Micro card reader.
* Access to a PC and a SD Micro card reader.
* A USB cable to be connected between the pi and the 3d printer. With my Ender 3, it's USB A <-> USB mini, but it may vary.
* A USB cable to be connected between the pi and the 3d printer. With my Ender 3, it's USB A <-> USB mini, but it may vary.
=== Initial setup ===
Download the [https://downloads.raspberrypi.org/raspbian_lite_latest latest raspbian lite], unzip it and dd it onto the SD card. To find your SD card device from Linux, run '''lsblk''' and to find it with macOS, run '''diskutil list'''. With Windows, search the net to find some tool to save the planet for you. Once downloaded, unzip the file and you're ready to create the boot image. Replace the X in the device name with the appropriate letter on your machine and don't blame me if you overwrite your harddisk with rubbish, and substitute ''2018-11-13-raspbian-stretch-lite.img'' with the name of the file you downloaded.
==== Linux ====
<pre>
# dd if=2018-11-13-raspbian-stretch-lite.img of=/dev/sdX bs=1M status=progress
</pre>
==== Mac ====
<pre>
# dd if=2018-11-13-raspbian-stretch-lite.img of=/dev/rdiskX bs=1024k
</pre>
''Note that using /dev/rdiskX instead of /dev/diskX on macOS speeds things up a '''lot''' because you bypass the system buffer, which for some reason slows things down badly.
=== Network ===
If using cabled networking, just connect it and wait for it to get an IP address. If running headless (no monitor/keyboard attached), make sure to create an empty file '''ssh''' under the /boot directory (that little FAT partition on the SD card) to have it listen to ssh. If using wifi, add another file to the boot dir, '''wpa_supplicant.conf''', containing
<pre>
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
    ssid="my-ssid"
    psk="my-secret-password"
    key_mgmt=WPA-PSK
}
</pre>
I trust you'll find the pi's IP address easily by [https://nmap.org/ nmapping] the network or similar if using a headless pi.

Revision as of 12:10, 15 December 2018

Raspberry pi with touchscreen and octoprint

I found an old el-cheapo LCD for Raspberry Pi with resitive touch, something like this. Lacking something else to do, with -10°C outside, using a pi with OctoPrint with a touchscreen seems like a decent thing to do. For something close to production, you'll probably want capacitive touch and perhaps something larger than this, but hell, I'm bored.

Stuff needed

  • A raspberry pi model 2 or higher. The old 700MHz model 1 has too little CPU and memory - the others will do. As always, you'll need a power supply giving you 5V and at least 2A, preferably closer to 3A.
  • A Micro SD card, 4GB or larger - preferably 16-32GB since you'll probably use it to hold some gcode files as well.
  • A chassis for the pi and the touchscreen. If using the mentioned screen, something like this should do. All you need is access to a 3d printer, filament and some time.
  • Access to a PC and a SD Micro card reader.
  • A USB cable to be connected between the pi and the 3d printer. With my Ender 3, it's USB A <-> USB mini, but it may vary.

Initial setup

Download the latest raspbian lite, unzip it and dd it onto the SD card. To find your SD card device from Linux, run lsblk and to find it with macOS, run diskutil list. With Windows, search the net to find some tool to save the planet for you. Once downloaded, unzip the file and you're ready to create the boot image. Replace the X in the device name with the appropriate letter on your machine and don't blame me if you overwrite your harddisk with rubbish, and substitute 2018-11-13-raspbian-stretch-lite.img with the name of the file you downloaded.

Linux

# dd if=2018-11-13-raspbian-stretch-lite.img of=/dev/sdX bs=1M status=progress

Mac

# dd if=2018-11-13-raspbian-stretch-lite.img of=/dev/rdiskX bs=1024k

Note that using /dev/rdiskX instead of /dev/diskX on macOS speeds things up a lot because you bypass the system buffer, which for some reason slows things down badly.

Network

If using cabled networking, just connect it and wait for it to get an IP address. If running headless (no monitor/keyboard attached), make sure to create an empty file ssh under the /boot directory (that little FAT partition on the SD card) to have it listen to ssh. If using wifi, add another file to the boot dir, wpa_supplicant.conf, containing

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
    ssid="my-ssid"
    psk="my-secret-password"
    key_mgmt=WPA-PSK
}

I trust you'll find the pi's IP address easily by nmapping the network or similar if using a headless pi.