Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:54 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : using a macbook pro

     Page 1 of 3    
Author Message
Quazee137

Guru

Joined: 07/08/2016
Location: United States
Posts: 571
Posted: 09:53am 25 Jun 2022
Copy link to clipboard 
Print this post

My Granddaughter and Grandson-in-law use a macbook pro.

How to work with the picomite?

I know the OSX is like linux but not something I have worked with.

Need help on how to setup the usb to talk with the picomite?

I have them playing with the micro:bit using online editor and dropping
the program on the micro:bit as a usb drive.

He tried to install minicom but it didn't seem to work.
Not being a into the tech parts of the OS.

I have Pimobile kit from Sunfounder he put together. We can not get the Bluetooth
on the Robot Hat to communicate with the mac.

The SundFounder BT-01 on the hat and a Ezblock Bluetooth Dongle also has BT-01
on it.

I plugged the dongle in my system and used minicom.
All I get is "STATUS" and a unprintable character repeatedly.  

I am useless as I do not know what apps / tools to use on a Macbook.

No Ezblock editor for Linux Mint just Mac/ RPi / Win

So any help / ref would be appreciated.

Thanks Quazee137
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9124
Posted: 10:44am 25 Jun 2022
Copy link to clipboard 
Print this post

Manual page 7

  Quote  Apple Macintosh
The Apple Macintosh (OS X) is somewhat easier as it has the device driver and terminal emulator built in.
First start the application ‘Terminal’ and at the prompt list the connected serial devices by typing in:
ls /dev/tty.*.
The USB to serial converter will be listed as something like /dev/tty.usbmodem12345. While still at the
Terminal prompt you can run the terminal emulator at 38400 baud by using the command:
screen /dev/tty.usbmodem12345 38400
By default the function keys will not be correctly defined for use in the PicoMite's built in program editor so
you will have to use the control sequences as defined in the section Full Screen Editor of this manual. To avoid
this you can reconfigure the terminal emulator to generate these codes when the appropriate function keys are
pressed.
Documentation for the screen command is here: https://www.systutorials.com/docs/linux/man/1-screen/
 
Quazee137

Guru

Joined: 07/08/2016
Location: United States
Posts: 571
Posted: 01:14am 26 Jun 2022
Copy link to clipboard 
Print this post

Big Thanks mather

Now they can learn MMBasic and have FUN.

Funny how easy it is with a bit of know how.
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 01:37pm 17 Sep 2023
Copy link to clipboard 
Print this post

Hi,
I have loaded my RPi pico with picomite.
It gives me the prompt > in Mac OS CoolTerm and works OK

This is the response I get when I use Terminal on my MacMini 12.6.9
mack@macmini2018 ~ % ls /dev/tty.*.
zsh: no matches found: /dev/tty.*.
mack@macmini2018 ~ % ioreg -p IOUSB
+-o Root  <class IORegistryEntry, id 0x100000100, retain 23>
 +-o AppleUSBVHCIBCE Root Hub Simulation@80000000  <class AppleUSBRootHubDevic$
 | +-o Apple T2 Controller@80100000  <class AppleUSBDevice, id 0x1000004fd, re$
 | +-o Headset@80200000  <class AppleUSBDevice, id 0x100000503, registered, ma$
 +-o AppleUSBXHCI Root Hub Simulation@01000000  <class AppleUSBRootHubDevice, $
 | +-o USB3.0 Hub@01100000  <class AppleUSBDevice, id 0x10000051e, registered,$
 +-o AppleUSBXHCI Root Hub Simulation@14000000  <class AppleUSBRootHubDevice, $
   +-o USB2.0 Hub@14100000  <class AppleUSBDevice, id 0x100000537, registered,$
   | +-o Hub in Apple Extended USB Keyboard@14140000  <class AppleUSBDevice, i$
   |   +-o Apple Extended USB Keyboard@14143000  <class AppleUSBDevice, id 0x1$
   |   +-o Microsoft 5-Button Mouse with IntelliEye(TM)@14141000  <class Apple$
   +-o Pico@14600000  <class AppleUSBDevice, id 0x10001e97a, registered, match$

The RPi is connected as CoolTerm works and the ioreg -p IOUSB cmd shows the Rpi connected to a usb +-o Pico@14600000

How do I use the screen cmd?
screen /dev/tty.usbmodem12345 38400
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 02:35pm 17 Sep 2023
Copy link to clipboard 
Print this post

I have been able to connect Mac OS Terminal with my picomite using the cmd
screen /dev/tty.usbmodem14601 38400

I found the usbmodem number 14601 from my Arduino IDE!

So now i have the picomite > prompt

What is the cmd to copy a xxx.bas file from my Mac desktop to my Rpi pico running picomite?
 
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 02:42pm 17 Sep 2023
Copy link to clipboard 
Print this post

Webmite on the Mac.

Plug the Webmite into the USB port. Open the Terminal.app and at the prompt type ls /dev Enter [that's Lima Sugar as in LiSt command].

Scroll up in the listing of dev devices until you see tty.usbmodemXXXXX, it's usually just below the tty.Bluetooth-Incoming-Port. In situations where screen remains running in the background you can use screen -r to resume the terminal session.

Now at the prompt type screen /dev/tty.usbmodemXXXXX and Enter. Hit Enter for luck and then Ctrl C and you should be at the MMBasic prompt >

On my ancient MacBook Pro F1, F2, F3, F4 work as advertised. Inside the EDITor F1, F2, F3, F4 works as advertised, but Shift-F3 doesn't so I use Ctrl-G for F3.

I notice that Fn-Cursor key gives me the Page UP/Down and Start/End of Line.

In the Terminal app you can use the mouse cursor to position the cursor but you must Allow Mouse Reporting in the View menu tab or use Cmd-R to toggle it.

In the Terminal Settings menu or Cmd, you can change the look and feel, I like the transparent background of the Pro setting and I have changed the cursor to a blinking red block, easier to find than the underscore.

Hope this helps a bit.
Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 02:42pm 17 Sep 2023
Copy link to clipboard 
Print this post

Webmite on the Mac.

Plug the Webmite into the USB port. Open the Terminal.app and at the prompt type ls /dev Enter [that's Lima Sugar as in LiSt command].

Scroll up in the listing of dev devices until you see tty.usbmodemXXXXX, it's usually just below the tty.Bluetooth-Incoming-Port.

Now at the prompt type screen /dev/tty.usbmodemXXXXX and Enter. Hit Enter for luck and then Ctrl C and you should be at the MMBasic prompt >. In situations where screen remains running in the background you can use screen -r to resume the terminal session.

On my ancient MacBook Pro F1, F2, F3, F4 work as advertised. Inside the EDITor F1, F2, F3, F4 works as advertised, but Shift-F3 doesn't so I use Ctrl-G for F3. Page 16 of the Semite manual ver 3 lists all the Ctrl-combinations.

I notice that Fn-Cursor key gives me the Page Up/Down and Start/End of Line.

In the Terminal app you can use the mouse cursor to position the cursor but you must Allow Mouse Reporting in the View menu tab or use Cmd-R to toggle it.

In the Terminal Settings menu or Cmd, you can change the look and feel, I like the transparent background of the Pro setting and I have changed the cursor to a blinking red block, easier to find than the underscore.

Hope this helps a bit.
Edited 2023-09-18 00:47 by carlschneider
Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
carlschneider
Senior Member

Joined: 04/08/2023
Location: South Africa
Posts: 158
Posted: 03:10pm 17 Sep 2023
Copy link to clipboard 
Print this post

Webmite on the Mac Part 2 :)

To get anything from the Mac onto the A: drive of the Webmite you need to use TFTP and do a binary mode PUT.

So open (another instance of) terminal.app and navigate to the subdirectory where the .bas file is stored. Usually this would be through the cd [change directory] command at the terminal prompt. You can see where you are in the string behind the prompt on the command line. If in doubt use ls to see what files and sub-directories are present at your current location.

Once you are at the appropriate destination you can then launch TFTP ipaddress$ at the command line prompt. The prompt will change to tftp>. [ipaddress$ is the IP address of the Webmite and presupposes that you have at least configured the Option WIFI ssid$,password$]

At the tftp> type Binary to set the mode to binary mode. This ensures an unpadded byte by byte transfer. Looks like this in terminal

tftp>binary

Then at the tftp> type put filename.bas [no " " required in tftp]. Looks like this in terminal

tftp>put filename.bas

On the other instance of terminal that has screen active [you can see the Webmite console], you will see the Webmite responding to the tftp put. Doing a files on screen linked terminal [Webmite console] will then list the contents of the Webmite's A: drive and you should see your filename.bas now present.

To move a file from the Webmite to the Mac you need to use the GET command on tftp. Looks like this
tftp>get filename.bas

Clearly you have, at the MMBasic prompt on the Webmite used the save "filename.bas" [noting the " " requirement] to copy the program out of memory onto the A: drive.

To load filename.bas into program memory you use load "filename.bas" at the MMBasic prompt. Looks like this

>load "filename.bas"

I have found autosave append very handy to copy the clipboard into the program memory on the Webmite. The appended text appears at the end of the current program. Looks like this on the Webmite

>autosave append
A whole
lot
of copied
stuff using
Cmd-v to
paste from the
clipboard

Use Ctrl-Z to stop the autosave append and the > prompt will appear after a short pause.

Hope this helps
Cheers Carl                                                        
Retirement is tough on Hobbies without a day job
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 04:39pm 17 Sep 2023
Copy link to clipboard 
Print this post

I tried this cmd from MacOS Terminal after running screen and getting the >prompt
> FILES
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2000          4  bootcount
2 directories, 1 file, 712704 bytes free
> COPY /Users/mack/Desktop/lcd_picomite.bas TO A:/lcd_picomite.bas
Error : Invalid operator
> COPY "/Users/mack/Desktop/lcd_picomite.bas" TO "A:/lcd_picomite.bas"
Error : Could not find the file

The file does exist on my Mac OS desktop.

What is the cmd to transfer a file from my mac to the Rpi pico?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 05:03pm 17 Sep 2023
Copy link to clipboard 
Print this post

It doesn't work like that, macmite. A PicoMite is actually on the end of a serial port, it's not a USB drive unless it's simulating one while having MMBasic loaded from a uf2 file initially.

Because it's a serial port device you have to connect to it via a terminal emulator and transfer files via that, so the Copy command on the mac is useless. Exactly how you can transfer files will depend on your terminal emulator, but the usual way is to use XMODEM, which is explained in the manual. If your terminal emulator supports it (which Tera Term does on Windows) you can use AUTOSAVE on the PicoMite then drag your program (i.e. a BAS file) to your terminal and it will be sent to the PicoMite like a fast typist. You need to terminate the command with Ctrl Z  on the PicoMite, which will save the program into user space and end the transfer.

I have no experience with Apple products, but I hope this helps a little.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 05:19pm 17 Sep 2023
Copy link to clipboard 
Print this post

As Mick says.

I'm not a MacOS guy but I had a Google around and it looks like if you want XMODEM from the command line you have to resort to the sx command (from lrzsz, also see https://linux.die.net/man/1/sz). Unfortunately it doesn't look like much fun.

I take it you are not a "C" programmer otherwise I would suggest trying to get MMBasic For Linux (MMB4L) to compile under MacOS and then you could use my 'gonzo' program.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 07:34am 18 Sep 2023
Copy link to clipboard 
Print this post

Hi,
The Serial.app works fine but it is not freeware $60 from App store!
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 07:49am 18 Sep 2023
Copy link to clipboard 
Print this post

  macmite said  Hi,
The Serial.app works fine but it is not freeware $60 from App store!


I don't think you can really blame that on MMBasic. ;)  It was developed on (and is still primarily supported on) Windows only. The principal terminal emulator that it is always tested with is Tera Term.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 09:29am 18 Sep 2023
Copy link to clipboard 
Print this post

Hi,
I have copied xxx.bas files to the picomite
i have opened screen ... and get the > prompt
Now I want open the file and edit it and then save it and run it.
I can open EDIT but what is the cmd to display the ...bas file for editing?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 10:07am 18 Sep 2023
Copy link to clipboard 
Print this post

The easiest way to edit is by using the PicoMite's built-in editor, not an external one. Simply press F4 and you are in the editor. Press F1 while in the editor and you are back in command mode. Press F2 while in the editor and your program will run.

While using the built-in editor your current file will be automatically reloaded at boot up.

You can save your programs to the built-in flash slots or to the built-in Drive A:.

There is a lot on basic operation of the editor in the manual.

On Windows (and using Wine for Linux, I think) there is also MMedit. That is an external editing system that stores the file externally. AFAIK there is no way to run this on a Mac but, as I said, I have no experience of Apple products.
Edited 2023-09-18 20:08 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 10:16am 18 Sep 2023
Copy link to clipboard 
Print this post

  macmite said  Hi,
I have copied xxx.bas files to the picomite
i have opened screen ... and get the > prompt
Now I want open the file and edit it and then save it and run it.
I can open EDIT but what is the cmd to display the ...bas file for editing?


The step you are missing is that you need to:
LOAD "xxx.bas"

and then:
EDIT

Peter has recently updated the firmware (though I'm not sure whether for PicoMite, PicoMiteVGA or WebMite) so you can type:
EDIT "xxx.bas"

Though there is a subtle (?) difference.

When you just do EDIT you aren't actually editing "xxx.bas" but a copy that has been loaded into flash slot 0, if you want to update the copy of the file on disk you then have to do an explict SAVE "xxx.bas" after editing.

If you do EDIT "xxx.bas" you are (in theory, and assuming I know what I am talking about) actually editing the copy on disk.

Best wishes,

Tom
Edited 2023-09-18 20:17 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 11:55am 18 Sep 2023
Copy link to clipboard 
Print this post

If you do
LOAD "xxx.bas"

and then:
EDIT

you must remember to do
SAVE "xxx.bas"

at some point or your changes don't make it back to the flash file system.

You don't have this problem if you do
EDIT "xxx.bas"

In that case, your changes are automatically made to the file system version.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
macmite
Newbie

Joined: 12/09/2023
Location: Australia
Posts: 23
Posted: 02:52pm 19 Sep 2023
Copy link to clipboard 
Print this post

My earlier statement that I uploaded files and saved them was incorrect.

I upload a file from my Mac to the pico using Serial.app in VT100 emulation mode.
It is immediately is executed.
The uploaded file contents and its execution output are displayed.
If I use the cmd RUN it does not execute.
If use EDIT there is no file.
If I use the SAVE cmd it saves only the fname that I choose. (FILES shows only 0 bytes)
Where is the uploaded file stored?
How do I SAVE the upload file to the A:/...?
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4043
Posted: 03:04pm 19 Sep 2023
Copy link to clipboard 
Print this post

  macmite said  I upload a file from my Mac to the pico using Serial.app in VT100 emulation mode.
It is immediately is executed.
The uploaded file contents and its execution output are displayed.
If I use the cmd RUN it does not execute.


I don't think that makes any sense, we're missing something. Can you post a full transcript (copy & paste from the terminal, screenshots or video) of what you are doing and seeing.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 03:14pm 19 Sep 2023
Copy link to clipboard 
Print this post

Was it a *.BAS file? They are normal ASCII text files of MMBasic instructions. You can't load any other sort of file.
How did you do the transfer? Using XMODEM or AUTOSAVE ?

On the PicoMite the file is downloaded into temporary storage initially. You must then save it either to a flash slot or to a drive (e.g. A:) before it is actually present on the system.

I've never come across a downloaded file running immediately without user intervention. I can only think that the file isn't correctly formed or the transfer method is doing something odd.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
     Page 1 of 3    
Print this page
© JAQ Software 2024