Misc
Last Updated: Oct 25, 2024
This guide provides instructions on miscellaneous how-to questions.
Contents
- Contents
- How to charge the power bank
- How to transfer file from MBot to your laptop - wormhole
- Pi5 - Disk is full
How to charge the power bank
- Push the switch of the power bank to position “I” to make the charging circuit breakout.
- Connect the charger to the power bank
- The LED indicator on the AC-DC charger head showing RED means the charging process is working.
- The LED indicator on the AC-DC charger head showing GREEN means the charging process has completed.
How to transfer file from MBot to your laptop - wormhole
There is a command-line tool, called wormhole that comes in handy. It can safely and conveniently transfer things from one computer to another.
The scenario with the wormhole tool is as follows: If you’ve recorded a log file on the Pi, or just have some files need to transfer it to your laptop without uploading it to Github, you can use wormhole for this purpose. Below is an example of its usage:
Install
# On the Pi
$ sudo apt install magic-wormhole
# On your laptop
brew install magic-wormhole # for Mac
sudo apt install magic-wormhole # for Ubuntu
Send and Receive
# on Pi, send the file:
wormhole send <path-to-file>
# then on your laptop, receive the file:
wormhole receive <code-wormhole-generated>
Pi5 - Disk is full
- Check how much space is left by running:
$ df -h
- Look for the line with
/
in the “Mounted on” column. This is your main storage. For example:Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p2 29G 11G 17G 40% /
- Look for the line with
- You can identify large files by
du -h --max-depth=1 <Path> | sort -rh | head -n 10
:$ du -h --max-depth=1 ~ | sort -rh | head -n 10
- This command lists the 10 largest items in your home directory. Example output:
1.5G /home/mbot 410M /home/mbot/.vscode-server 342M /home/mbot/.cache 253M /home/mbot/mbot_ws 237M /home/mbot/.config 178M /home/mbot/.vscode 55M /home/mbot/Bookshelf 34M /home/mbot/.envs 8.2M /home/mbot/.nx 168K /home/mbot/.dotnet
- Here,
.vscode-server
can be safely deleted$ rm -rf ~/.vscode-server
.
- This command lists the 10 largest items in your home directory. Example output:
- You can free up space by removing unnecessary package files:
sudo apt clean