Tenrec: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
mNo edit summary
Line 87: Line 87:
as root.
as root.


'''For ALEXA, do not install pulseaudio''' it makes her sound crackly and talk slowly. (Seriously weird.)
I hacked around with pulseaudio because it was not working. I used some notes from  
I hacked around with pulseaudio because it was not working. I used some notes from  
[https://raspberrypi.stackexchange.com/questions/639/how-to-get-pulseaudio-running here, on StackExchange.]
[https://raspberrypi.stackexchange.com/questions/639/how-to-get-pulseaudio-running here, on StackExchange.]

Revision as of 02:37, 17 August 2020

Tenrec is a Raspberry Pi 4B

photo credit

2020-May-09 arrived from Newark

I set it up as a build machine, with its faster processor and more RAM and SSD on USB3 it runs circles around violet (Pi 3B+) and of course my little Pi Zeroes.


Hardware

Cable management is always an issue with the Pi, they stick out everywhere! :-)

  • 4GB 4B
  • Seeed heatsink kit so cute, had to have one. Probably superfluous.
  • 7" Pi touch screen from Element14
  • Multicomp Pro case, clear
  • Corsair GTX 240GB SSD
  • Startech USB3S2SAT3CB USB3.0-SATA3 cable w/UASP (lsusb id is 174c:55aa with ASMedia ASM1053E chipset)
  • Kensington USB3 hub


I drilled a couple holes in the bottom of the case, attached RAM mount hardware.

I got a Kensington USB3 hub and I run it on a separate 5V supply, so now it's powering the Apple keyboard and a Startech USB3 SATA cable.

The combination of USB3, SATA3, and a reasonably fast SSD is working well.

Quirks tests

set quirks=174c:55AA in /boot/cmdline.txt then run sudo ./Storage.sh and observe the results

     Category                  Test                      Result
HDParm                    Disk Read                 162.96 MB/s
HDParm                    Cached Disk Read          161.84 MB/s
DD                        Disk Write                163 MB/s
FIO                       4k random read             IOPS ( KB/s)
FIO                       4k random write            IOPS ( KB/s)
IOZone                    4k read                   15504 KB/s
IOZone                    4k write                  23439 KB/s
IOZone                    4k random read            15545 KB/s
IOZone                    4k random write           21437 KB/s

With quirks turned off, it's faster

     Category                  Test                      Result
HDParm                    Disk Read                 270.66 MB/s
HDParm                    Cached Disk Read          265.18 MB/s
DD                        Disk Write                166 MB/s
FIO                       4k random read             IOPS ( KB/s)
FIO                       4k random write            IOPS ( KB/s)
IOZone                    4k read                   16087 KB/s
IOZone                    4k write                  20849 KB/s
IOZone                    4k random read            16183 KB/s
IOZone                    4k random write           23324 KB/s


Screen and touch screen rotation

In this case, the 7" screen is upside down. You can fix this! https://raspberrypiprojects.com/raspberry-pi-rotate-touch-screen/ Also the image did not fill up the screen, perhaps it was defaulting to 640x480?

In /boot/config.txt,

lcd_rotate=2
framebuffer_width=800
framebuffer_height=480

On the login screen with these settings there is a white band on the right, one or two pixels wide but I don't care. It goes away after login.

Power

I had the lightning bolt low voltage warning almost continuously until I plugged in only a hub to the USB ports. I am using a 5V 4A switching supply and a USB-C cable. My power meter says it's pulling just over an amp at 5.2 volts.

Software

I installed Raspian Buster Lite on the 8GB SD card that I am using to boot. Then I copied the contents to the SSD and set it up to mount /dev/sda2 as root.

For ALEXA, do not install pulseaudio it makes her sound crackly and talk slowly. (Seriously weird.) I hacked around with pulseaudio because it was not working. I used some notes from here, on StackExchange.

I am using a Logitech camera for its microphone and the built in audio line out.

Adding X11

I installed the window environment on the SSD. Also it goes without saying, emacs.

sudo -s
dpkg --configure -a
apt update
apt full-upgrade
reboot
apt install emacs-nox
apt install xserver-xorg xinit
apt install raspberrypi-ui-mods
reboot

Now I have a lightdm login screen, so I log in.

Adding Squeezelite

http://www.winko-erades.nl/installing-squeezelite-player-on-a-raspberry-pi-running-jessie/

Adding Alexa

Sample code is in /home/pi/alexa/.

I did a clean build after switching from Violet (Debian Stretch) to Tenrec (Debian Buster). Finally I did the build on the console on Tenrec after trying a few times from remote SSH sessions that got interrupted by random life events like dinner and walks.

 Wake word:                                                                 |
|       Simply say Alexa and begin your query.                               |
| Tap to talk:                                                               |
|       Press 't' and Enter followed by your query (no need for the 'Alexa').|
| Hold to talk:                                                              |
|       Press 'h' followed by Enter to simulate holding a button.            |
|       Then say your query (no need for the 'Alexa').                       |
|       Press 'h' followed by Enter to simulate releasing a button.          |
| Stop an interaction:                                                       |
|       Press 's' and Enter to stop an ongoing interaction.                  |
| Privacy mode (microphone off):                                             |
|       Press 'm' and Enter to turn on and off the microphone.               |
| Playback Controls:                                                         |
|       Press '1' for a 'PLAY' button press.                                 |
|       Press '2' for a 'PAUSE' button press.                                |
|       Press '3' for a 'NEXT' button press.                                 |
|       Press '4' for a 'PREVIOUS' button press.                             |
| Settings:                                                                  |
|       Press 'c' followed by Enter at any time to see the settings screen.  |
| Speaker Control:                                                           |
|       Press 'p' followed by Enter at any time to adjust speaker settings.  |
| Firmware Version:                                                          |
|       Press 'f' followed by Enter at any time to report a different        |
|       firmware version.                                                    |
| Info:                                                                      |
|       Press 'i' followed by Enter at any time to see the help screen.      |
| Reset device:                                                              |
|       Press 'k' followed by Enter at any time to reset your device. This   |
|       will erase any data stored in the device and you will have to        |
|       re-register your device.                                             |
|       This option will also exit the application.                          |
| Reauthorize device:                                                        |
|       Press 'z' followed by Enter at any time to re-authorize your device. |
|       This will erase any data stored in the device and initiate           |
|       re-authorization.                                                    |
|                                                                            |
| Quit:                                                                      |
|       Press 'q' followed by Enter at any time to quit the application.  

Hooking up some NeoPixels

https://www.instructables.com/id/Alexa-Assistant-With-a-10-Raspberry-Pi-Zero-W-and-/