Raspberry Pi 5 with PiMoroni NVME drive, switch to boot from NVME The next challenge – expand the partition to match the NVME drive size Last step, resize the file system lblk df -h We now have 448 gigs ..
..
Specs: BP-TCA-12/2510 SN battery, rated at 4V 4400mAh 17.6 Wh Battery charge percentage, from 100% (4 VDC) to 0% (3 VDC), over time. Here we are powering a simple Raspberry Pi Zero W. We start at 100% battery (4V) at around midnight (00:00) and we get to 0% battery (3V) after 24 hours. It’s noteworthy ..
See: https://github.com/rcdrones/UPSPACK_V3/blob/master/README_en.md ls -l /dev and check that you can see serial0 It works! Disconnect the power to the UPS and you will see the Power disconnected message change. If you see error: “could not open port /dev/ttyAMA0: [Errno 13] Permission denied: ‘/dev/ttyAMA0′”, then you need to run the program with sudo and specify with ..
Use Other -> Raspberry Pi OS Lite 32 bit Bookworm with no desktop. If you make the mistake to use the 64 bit image on a Pi Zero, you’ll see the colored screen and nothing else. Before writing the image, also edit the settings, set a host name, set a wifi ssid and password, create ..
..
..
..
Using gparted, we see that 829 GB is unused, and we’re only using 100GB of that space. df -h shows the same, only 82 GB available, it’s a 100GB volume: To expand it to fit 100%: Th..
Using a Pi Zero W with a sensor to read battery voltage. Sensor, board, and pi Voltage sensor: https://amzn.to/3AuDScb The famous serial to digital converter: MCP3008 that’s actually easy to set up: https://amzn.to/46Uw6Em The board: Voltage sensor: Pi Zero W: Lab power supply for testing: Exact wiring instructions: Wiring source: https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/mcp3008 Another great tutorial: Hardware ..
..
..
..
mkfs -t ext4 /dev/sda Mount the drive and check ..
..
..
Here it is with all the drives taken out. If using the Ubuntu image from: https://wiki.radxa.com/Rock4/downloads ex: curl -OL https://github.com/radxa/debos-radxa/releases/download/20221109-1007/rockpi-4b-ubuntu-focal-server-arm64-20221109-1331-gpt.img.xz apt-get will be broken, so you might need to run: wget -O – apt.radxa.com/focal-stable/public.key | sudo apt-key add – sudo apt-..
High Ability High Availability Software (HAHA Software), a subsidy of HAHA Business. Launching first product – 4/1/2024 Re-launch date (in case of rain) –..
Scenario: only allow local IPs to access the server. For exceptions, allow access but only by IP. The 2 include files that you see under location / are: Generate a 100 MB file of random bytes for my403.html and for my40x.html: Create the 2 html files which are actually sym links Watch the logs of ..
lsusb The Samsung vendor ID we need is 04e8 Also: Restart: Also, important, enable USB debugging on the phone. Won’t work without. You’ll be prompted to accept the connection from the PC to the phone. https://askubuntu.com/questions/632651/adb-devices-command-wont-detect-my-4-4-and..
..
..
..
..
..
Useful on setting up something like this M.2 SSD on this Raspberry Pi: Aluminium Pi 4 NAS Case with Low-Profile ICE To..
NVME to USB Docking Station,ACASIS M.2 SSD to USB Adapter Portable External SSD Enclosure for M.2 (M Key) NVMe SSD and (B+M Key) SATA-Based SSD Compatible with Thunderbolt 4/3 Link: https://www.amazon.com/Enclosure-Tool-Free-Portable-Docking-Station/dp/B..
Amazon: https://www.amazon.com/dp/B088HCY4TH Geekworm for Raspberry Pi 4, X862 V2.0 M.2 NGFF SATA SSD Storage Expansion Board UASP Supported Compatible with Raspberry Pi 4 Model B Only Support Key-B 2280 SSD About this item wiki.geekworm.com..
..
If you want to see the XML for the entire VM, using: The edited sections will look like this: and To automount this on VM startup, y..
Examp..
..
change it from NAT to your newly defined bridge, br0: And start the VM After the VM is started, run ifconfig and you’ll see the DHCP address from your network’s router or pfsense, etc. In this case it’s: 10.1.10.239 – Get the ether hardware IP and set up your own static IP rules, etc. Good ..
Download the image writer from https://wiki.radxa.com/Rockpi4/downloads Run it as administrator: Select the image Write it to the card Wait for it to verify Stick it into the rock pi Boot up If it’s the right image, you’ll see both a green light on the rock pi, and a smaller blue light that starts flashing, meaning ..
..
..
How to renew a domain using DNS: The error: “none of the preferred challenges are supported by the selected plugin” Switch to –manual and switch to use DNS: Edit the domain online, add a T..
..
..
The fix: Also, if you see this: [ERROR DirAvailable–var-lib-etcd]: /var/lib/etcd is not e..
..
The error: The connection to the server IP:6443 was refused – did you specify the right host or port? Also make this ..
Pos..
The library: The error: The fix: Create a new Java file: Create the 2 specified directories as well, c:\temp\mongotemp and c:\temp\mongoartifacts Run the app. In the c:\temp\mongotemp you will see the mongo executable that the system policy was blocking from running e..
The Lady Luck (formerly known as the Newtown Creek), is a 324 foot (98 m) decommissioned City of New York sludge tanker. It was sunk on July 23rd, 2016 about 1.5 miles east of the Pompano Beach pier, and became an artificial reef, a haven for fish, and the new favorite diving destination. What’s different ..
Abstract This article is a recollection of fun memories from the Guinness World Record Scuba Diving Event with Allen “The Grouper” Sherrod, and my personal involvement in building an underwater live streaming system to broadcast the event live to the world. In the end, Allen Sherrod broke the world record! Here’s how we did it. ..
Install VLC Enable the camera and select finish, reboot. Start streaming Add contents: Save, test it: If it works, stop it again, Control + C Create a startup script with contents: Save it. Make it executable Add it to always start up Reboot and test that it starts up Reboot and test that it starts ..
Description: ASUS USB-N10 Wireless Adapter IEEE 802.11b/g/n USB 2.0 Up to 150Mbps Wireless Data Rates 64/128-bit WEP, TKIP, AES, WPA-PSK, WPA2-PSK Plug it in: Turn on hub: Test the connection by downloading large files. endlessdownload.sh: Examp..
i..
Install gitlab runner, docker version: https://docs.gitlab.com/runner/install/docker.html Register the runner: Then edit the config.toml and set priviledged=true and restart the gitlab-runner container Watch the log The resulting runner configuration, and an example config.toml where docker connects v..
W..
This shows you how to create a nexus3 repository, create an HTTP connector (on port 8123), and docker login against that connector, and docker push images to the repo. Create the repo using http and additionally allow port 8123: Select docker(hosted) Since this is running on 8081, we can use http://host.domain:8081 to log in from, locally. 8123 is used for https ..
First, you can set up a mounted share drive from a NAS if you have one. You have to use ID 200 if you do this, because docker runs as 200 Ne..
You’re stuck at this place: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login Create a service account: Get the secret: Ex output: Copy the token, including the 6 characters after -token (in the above example it’s “cluster-admin-dashboard-sa-token-hhxv9“) Describe the secret to get the token: Example output: Copy the entire token, in this example from “ey… ” to “…t7g” Go to the login ..
Note: if Kubernetes is running on VirtualBox, add the port mapping so that you can access port 8001 from localhost In the shell, instead of running kubectl proxy, run: And then from the other system, hit the login URL: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/prox..
..
Log into your private registry manually from the shell: then grab this file: # the entire JSON string, and add it in Gitlab under your Group -> Settings -> CI/CD -> Variables, and add new variable:# Key: DOCKER_AUTH_CONFIG# Value: the JSON string from ..
On the registry server, which is on the network over http, accessible over port 5000, you can start it as: or with authentication, you do this instead: (only change myusernamehere and mysecretpasswordhere ) Once you’ve created the registry, leave that server and go to another server and try to log in: On the gateway server, have your ..
..
Set up the subdomain forward, and wait for it to propagate. When you can ping the domain, it’s ready. Be root Edit config file that’s available. nano /etc/nginx/sites-available/server.research.example.com Link it from available to enabled: Create empty dir to serve subdomain: Restart nginx Make sure you can hit the URL over http (https not quite yet) ..
On the build server, the server with Gitlab on it, create the directory where to cache jars: If you don’t have maven, install it: Edit your maven’s settings.xml file: Edit the gitlab-runner’s config.toml file: and the volumes entry, which maps <gitlab server’s directories>: Restart the runner: In the .gitlab-ci.yml file, specify -Dmaven.repo.local=/root/m2 so that the ..
..
..
..
Example script call: Shell script: Samp..
Run this command manually to turn ON nat dns host..
I recommend this: https://github.com/cubieplayer/Cubian/wiki/Install-Cubian Grab the HDMI image from http://cubian.org/downloads/ , like this one: http://cubieplayer.github.io/static_files/torrents/Cubian-nano-x1-a20-cubietruck-hdmi.img.7z.torrent Download it. Unzip it. Burn the .img file to a USB drive using Win32DiskImager: put it in the cubietruck, boot with it go through the setup, advanced, enable ssh server, save, exit Do everything here as root Check your version Edit the sshd confi ..
..
..
..
Credits: https://techcommunity.microsoft.com/t5/windows-11/ungroup-items-on-the-taskbar-in-windows-11/m-p/2905265 Start Powershell in administrator mode: C:\Windows\System32\WindowsPowerShell\v1.0 To change to never-combine, paste these commands, line by line. Each command ends with a semicolon; To undo the changes and to switch back to combine again, run these in Powershell in administr..
Adding a new Jail in FreeNAS: The error: Someone suggested this fix: But if it doesn’t work for you, then you just need to upgrade to version 12 instead: Go to System -> Update: Add a new jail should..
Go to System -> Update Wait for it to install. It’ll reboot. After rebooting, it’ll take a long time for it to install, but should come up e..
Access your server using the publish port: http://server-ip-here:60443 Get your root password: and log in. Make these changes at fi..
The scenario: you created an empty project in gitlab, and initialized it with a readme.md file. You also created a project on your PC and now want to hook up this project to your gitlab repository. The problem: you have trouble because there’s already a readme.md file in gitlab in the empt..
Download: https://db.apache.org/derby/releases/release-10_15_2_0.cgi create database mylocaldb maven: <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> <version>10.15.2.0</version> </depe..
Best First Search % —————————————————- % Alan Lupsha % Knight’s tour – using best-first search % June 4th, 2007 % —————————————————- :- [adts]. state_record(State, Parent, G, H, F, [State, Parent, G, H, F]). precedes([_,_,_,_,F1], [_,_,_,_,F2]) :- F1 =< F2. go(Start,Goal) :- empty_set(Closed), empty_sort_queue(Empty_open), heuristic(Start,Goal,H), state_record(Start, nil, 0, H, H, First_record), insert_sort_queue(First_record,Empty_open,Open), path(Open,Closed,Goal). path(Open,_,_) :- empty_sort_queue(Open), ..
..
The final product Setting up serial on the RPi Enable serial communication and disable login over serial, which you likely don’t need. sudo nano /boot/config.txt # add this line at the bottom, or make sure it’s set to 1: enable_uart=1 # reboot shutdown -r now # remove the login service over serial sudo systemctl stop ..
#!/bin/bash THEPATH=/mnt/d1 LIVEFILE=live while true do # if file exists, move it if [ ! -f $THEPATH/$LIVEFILE ]; then echo “ERROR: File not found so I can’t move it fore you, at $THEPATH/$LIVEFILE” else mv $THEPATH/$LIVEFILE $THEPATH/`date +%Y.%m.%d_%H.%M.%S.h264` fi FREEMEGS=` df $THEPATH | awk ‘{print $2}’ | grep -v 1K-blocks ` echo “Free megs: $FREEMEGS ..
Get the Windows binaries – ex: https://ffmpeg.zeranoe.com/builds/ -> download ex: https://ffmpeg.zeranoe.com/builds/win32/shared/ Unzip it, add the path of ffmpeg to your PATH variable, start command prompt, test that ffmpeg works, ex: ffmpeg –help To grab your stream from an already running camera, make sure the entire url works, i.e. don’t just use /stream, use /stream/video.mjpeg Control + C to ..
Credits: https://www.assetbank.co.uk/support/documentation/install/ffmpeg-debian-squeeze/ffmpeg-debian-jessie/ cd ~ mkdir software cd software/ wget http://ffmpeg.org/releases/ffmpeg-2.7.2.tar.bz2 cd src/ tar xvjf ../ffmpeg-2.7.2.tar.bz2 cd ffmpeg-2.7.2/ ./configure \ –enable-gpl \ –enable-libfaac \ –enable-avfilter \ –enable-libmp3lame \ –enable-libtheora \ –enable-libopenjpeg \ –enable-libvorbis \ –enable-libx264 \ –enable-libspeex \ –enable-nonfree –enable-postproc \ –enable-pthreads \ –enable-shared \ –enable-swscale \ make # wait a couple ..
#! /bin/bash # VBR=”3500k” # Bitrate FPS=”35″ # FPS QUAL=”fast” # ultrafast superfast veryfast faster fast medium slow slower veryslow YOUTUBE_URL=”rtmp://a.rtmp.youtube.com/live2″ # URL for YouTube RTMP SOURCE=”http://192.168.0.52:8080/stream/video.mjpeg” # Source UDP (this rpi ifconfig) KEY=”abcd-1234-????-????” # your YouTube key ffmpeg \ -re -threads 4 \ -i “$SOURCE” \ -f lavfi -i anullsrc \ -acodec libmp3lame -ar ..
How to mount a remote directory onto the local pi computer: Install SSH file system tools: # Add user pi to the fuse group: sudo gpasswd -a pi fuse Log out from the system. Reconnect as user pi. # make dir sudo mkdir /mnt/pimount # change ownership sudo chown pi:pi /mnt/pimount # mount ..
# be root sudo su # install utils apt-get install ntfs-3g root@pi2:/home/pi# blkid /dev/mmcblk0p1: SEC_TYPE=”msdos” LABEL=”boot” UUID=”7D5C-A285″ TYPE=”vfat” /dev/mmcblk0p2: UUID=”5d18be51-3217-4679-9c72-a54e0fc53d6b” TYPE=”ext4″ /dev/sda1: LABEL=”TinyTerra1″ UUID=”C642B17842B16E35″ TYPE=”ntfs” # create mount dir mkdir /mnt/d1 # edit fstab nano /etc/fstab # add: # drive 1 terra UUID=”C642B17842B16E35″ /mnt/d1 ntfs defaults,errors=remount,rw 0 1 # mount it mount ..
..
# make the dir mkdir /mnt/mount1 # list the drives ls -l /dev/disk/by-uuid/ total 0 lrwxrwxrwx 1 root root 15 May 6 2015 13d368bf-6dbf-4751-8ba1-88bed06bef77 -> ../../mmcblk0p2 lrwxrwxrwx 1 root root 15 May 6 2015 15CD-3B79 -> ../../mmcblk0p1 lrwxrwxrwx 1 root root 10 Dec 6 22:22 ba20caf8-6ef0-42e7-9e45-4187bfa8e543 -> ../../sda1 # get the ID, ex: ba20caf8-6ef0-42e7-9e45-4187bfa8e543 # ..
install samba sudo apt-get install samba # below, replace johnsmith with your user id that you want to connect to samba (i.e. not “pi”) # create a new group called samba sudo groupadd samba # create a system user who should have samba access, set all default info, and a password sudo adduser –no-create-home –disabled-password –disabled-login ..
sudo apt purge xserver* lightdm* raspberrypi-ui-mods vlc* lxde* chromium* desktop* gnome* gstreamer* gtk* hicolor-icon-theme* lx* mesa* sudo apt ..
sudo su nano cleanup.sh Paste this: # GUI-related packages – credits: https://gist.githubusercontent.com/samatjain/4dda24e14a5b73481e2a/raw/5d9bac8ec40b94833b4e9938121945be252fdee1/Slim-Raspbian.sh pkgs=” xserver-xorg-video-fbdev xserver-xorg xinit gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav epiphany-browser lxde lxtask menu-xdg gksu xserver-xorg-video-fbturbo xpdf gtk2-engines alsa-utils netsurf-gtk zenity desktop-base lxpolkit weston omxplayer raspberrypi-artwork lightdm gnome-themes-standard-data gnome-icon-theme qt50-snapshot qt50-quick-particle-examples ” # Edu-related packages pkgs=”$pkgs idle python3-pygame python-pygame python-tk idle3 python3-tk ..
create directory mydrive, which is where we’ll mount the attached drive sudo mkdir /mnt/mydrive change permissions sudo chown -R pi:pi /mnt/mydrive sudo chmod -R 775 /mnt/mydrive/ look up the block id of the drive sudo blkid /dev/mmcblk0p1: SEC_TYPE=”msdos” LABEL=”boot” UUID=”2D2D-CD16″ TYPE=”vfat” PARTUUID=”eea0d6a7-01″ /dev/mmcblk0p2: UUID=”2f840c69-cecb-4b10-87e4-01b9d28c231c” TYPE=”ext4″ PARTUUID=”eea0d6a7-02″ /dev/mmcblk0: PTUUID=”eea0d6a7″ PTTYPE=”dos” /dev/sda1: LABEL=”500g02″ UUID=”D4BE5EA9BE5E83C0″ TYPE=”ntfs” PARTUUID=”e7f2080e-01″ Look ..
https://www.phidgets.com/?&..
https://www.phidgets.com/?tier=3&catid=14&pcid=12&prodid=95 Given formula: Temperature C = ( VoltageRatio×222.2 ) – 61.111 VoltageRatio is the raw voltage you read divided by 5.0 VDC. Example: raw reading of 2.0145 VDC Voltage Ratio would then be: 2.0145 / 5.0 = 0.4029 Let’s re-write formula using raw voltage reading instead of ratio: C = R / 5 * 222.2 – 61.111 where ..
# install pip sudo su cd curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py pip –version # install DHT libraries sudo pip install Adafruit_Python_DHT # https://github.com/adafruit/Adafruit_Python_DHT/issues/63 sudo apt-get update sudo apt-get install rpi.gpio sudo apt-get install python3-rpi.gpio sudo apt-get install build-essential python3-dev sudo apt-get install python3-setuptools sudo apt-get install libzbar-dev libzbar0 git clone https://github.com/adafruit/Adafruit_Python_DHT.git cd Adafruit_Python_DHT sudo ..
Without the library, you can get this error: Could not locate the Phidget C library (libphidget22java.so). Make sure it is installed, and add it’ s path to LD_LIBRARY_PATH. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1320) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] ..
#!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin start() { cd /opt/tomcat/current/bin/ /bin/su pi /opt/tomcat/current/bin/startup.sh } stop() { /bin/su pi /opt/tomcat/current/bin/shutdown.sh } case $1 in start|stop) $1;; restart) ..
First make sure we added the admin user: nano /opt/apache-tomcat-9.0.0.M18/conf/tomcat-users.xml Add this at the bottom of the config: <role rolename=”manager-gui”/> <role rolename=”admin”/> <role rolename=”admin-gui”/> <role rolename=”manager-script”/> <role rolename=”manager”/> <user username=”admin” password=”yoursecretpasswordhere” roles=”admin,manager-gui,admin-gui,manager,manager-script,manager-status”/> </tomcat-users> Next, to allow remote login from different IPs… Make sure we’re shut down: /opt/apache-tomcat-9.0.0.M18/bin/shutdown.sh Check processes: ps aux | grep tomcat ..
#!/bin/bash if [ -z “$1” ]; then echo echo usage: $0 network-interface [delay in seconds] echo echo e.g. $0 eth0 echo e.g. $0 wlan0 30 echo exit fi if [ -z “$2” ]; then DELAY=5 echo “Using default, showing bandwidth usage every $DELAY seconds” else DELAY=1 fi IF=$1 while true do R1=`cat /sys/class/net/$1/statistics/rx_bytes` T1=`cat /sys/class/net/$1/statistics/tx_bytes` ..
/home/pi/live.sh #!/bin/bash # Rotation # raspivid –nopreview –rotation 180 -o – -t 9999999 -b 3000000 -w 1280 -h 720 | cvlc –ffmpeg-hw -vvv stream:///dev/stdin –sout ‘#rtp{sdp=rtsp://:8554}’ :demux=h264 raspivid –nopreview -o – -t 9999999 -b 3000000 -w 1280 -h 720 | cvlc –ffmpeg-hw -vvv stream:///dev/stdin –sout ‘#rtp{sdp=rtsp://:8554}’ :demux=h264 /etc/init.d/startcam #! /bin/sh ### BEGIN INIT INFO ..
..