Skip to content

Commit b837f6a

Browse files
committed
Updated README
updated README to add some instructions for connecting to the PicoCalc using minicom. Mostly I find instructions for windows users, so hopefully this will be helpful to someone.
1 parent 3d8fd81 commit b837f6a

1 file changed

Lines changed: 89 additions & 0 deletions

File tree

README.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,92 @@ The structure is like this:
99
- `art\` BASIC code for generating cool visualizations and art
1010
- `utils\` useful utilities
1111
- `toys\` little toy programs
12+
13+
## Transferring with the PicoCalc
14+
15+
The fastest way to transfer files, in bulk, is via the SD card -- if you have an SD card reader. Alternatively you can connect to the PicoCalc via the serial connection. First turn on the PicoCalc and connect to your computer via the USB-C port on the PicoCalc.
16+
17+
I use linux at home, and use [minicom](https://salsa.debian.org/minicom-team/minicom) to connect via the terminal. The first steps are to determine which device the PicoCalc has connected as, and add the appropriate permissions for the user to connect.
18+
19+
### Identifying the PicoCalc serial device
20+
21+
To find the device the PicoCalc has been mapped to
22+
23+
~~~bash
24+
25+
dmesg | grep -i uart
26+
27+
~~~
28+
29+
Scrolling through the output I find the following
30+
31+
~~~
32+
[ 1053.104717] ch341 1-1:1.0: ch341-uart converter detected
33+
[ 1053.105166] usb 1-1: ch341-uart converter now attached to ttyUSB0
34+
~~~
35+
36+
> [!TIP]
37+
> I use popOS at home and I found initially that the PicoCalc would connect, attach to ttyUSB0, and immediately disconnect. The solution was to uninstall `brltty`.
38+
39+
Which is the PicoCalc being detected and attached to `/dev/ttyUSB0`. The user requires read-write permission to connect to the device, which can be accomplished by adding it to the group the device is in with `ls`.
40+
41+
~~~bash
42+
43+
ls -lah /dev/ttyUSB0
44+
45+
~~~
46+
47+
48+
On my machine it is in the group `dialout`
49+
50+
~~~
51+
crw-rw---- 1 root dialout 188, 0 Dec 3 19:06 /dev/ttyUSB0
52+
~~~
53+
54+
After the user has been added to the group (and possibly after logging out and back in), the PicoCalc can be connected to without having to use `sudo`.
55+
56+
### Configuring minicom
57+
58+
Minicom will look for a config file in `$HOME` when given an appropriate name, and if one isn't found it will create it, e.g. this creates a config file named 'picocalc'
59+
60+
~~~bash
61+
62+
minicom picocalc
63+
64+
~~~
65+
66+
From within minicom hit `Ctrl-A` followed by `o` to open the configuration menu and adjust the default settings to the PicoCalc. This will save a `.minirc.picocalc` in `$HOME`, mine looks like this:
67+
68+
~~~
69+
# Machine-generated file - use setup menu in minicom to change parameters.
70+
pu port /dev/ttyUSB0
71+
pu rtscts No
72+
~~~
73+
74+
### Connecting to the PicoCalc
75+
76+
Once minicom is configured, a serial connection can be opened by simply calling the config file
77+
78+
~~~bash
79+
80+
minicom picocalc
81+
82+
~~~
83+
84+
This opens a terminal and any keystrokes are mirrored on the PicoCalc. To send a file from the computer to the PicoCalc, first enter the following into the PicoCalc
85+
86+
~~~
87+
xmodem receive "your/directory/and/file"
88+
~~~
89+
90+
Then hit `Ctrl-A` followed by `s` in minicom and select the file you wish to send. Since minicom is connected as a terminal this all be done in the same terminal window.
91+
92+
To do the reverse, first enter the following into the PicoCalc
93+
94+
~~~
95+
xmodem send "your/directory/and/file"
96+
~~~
97+
98+
Then hit `Ctrl-A` followed by `r` in minicom and give the filename to be saved locally. Again, with minicom connected as a terminal this can all be done in the same window.
99+
100+
Transferring programs and text files with [xmodem](https://en.wikipedia.org/wiki/XMODEM) is relatively fast, but anything large like an image file or music, is fairly slow and is probably worth transferring back and forth via the SD card.

0 commit comments

Comments
 (0)