Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 20:23 05 May 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 : Pi-cromite: V5.05.01

     Page 1 of 4    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 11:13am 27 Nov 2018
Copy link to clipboard 
Print this post

Please find attached version V5.05.01 of the Pi-cromite software. This brings the numbering back in line with the MM2/MM+

2018-11-27_210922_mmbasic.zip

2018-11-27_211352_Pi-cromite_Manual.pdf

The code contains the new GUI controls and the various bug fixes that Geoff has included in 5.05.01. The manual is updated to include instructions for starting and running MMBasic automatically on boot of the Pi. This version runs and is tested under Raspbian Stretch. I will no longer be supporting Jessie.

Edited by matherp 2018-11-28
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5914
Posted: 08:02pm 27 Nov 2018
Copy link to clipboard 
Print this post

Thanks for the update.

The manual still refers to AUTO which is not a known command.
  Quote  Use AUTO (and not AUTOSAVE) to enter automatic program entry mode.


Jim
VK7JH
MMedit   MMBasic Help
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 09:46pm 27 Nov 2018
Copy link to clipboard 
Print this post

  Quote  The manual still refers to AUTO which is not a known command.

Oh Bother....

2018-11-28_074619_Pi-cromite_Manual.pdf
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 04:48am 28 Nov 2018
Copy link to clipboard 
Print this post

This baffled me. In pi-cromite MMBasic 5.5.1 accessed through puTTY, I printed the contents of a long string, which was a slightly modified copy of a file. Only the last part of the string was visible, and when I scrolled up, above the text I had output were the linux commands I had entered prior to and upon starting MMBasic.

Ok, so of what I printed, I'm only seeing a screen's worth, and the rest has scrolled off. Is there a way to scroll back through the output of MMBasic for more than a screen's worth of text?

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 08:09am 28 Nov 2018
Copy link to clipboard 
Print this post

  Quote   Only the last part of the string was visible, and when I scrolled up, above the text I had output were the linux commands I had entered prior to and upon starting MMBasic.


The Pi-cromite operates in a windowed environment (always has). This allows cursor positioning and other facilities on the console (see CURSOR command in the manual).

If you need to see more increase the size of the putty terminal window. The Pi-cromite code will automatically adjust to the new window size.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 01:49pm 28 Nov 2018
Copy link to clipboard 
Print this post

Thanks. I already have the window from top to bottom of screen. Does MMEdit preserve the output so one could scroll back? I'll test it.

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 02:06pm 28 Nov 2018
Copy link to clipboard 
Print this post

Love the SYSTEM command for getting a file into a long string.

Dim as integer a(500) ' 4K bytes
system "cat filename",a()

Compared to what I had done previously--about 8 lines to open the file, start a loop, read a line, concatenate to long string, loop until EOF, close the file.

How do you do this within MMBasic--named pipe or what (I mean with underlying C code)?

Is there a similarly simple way to write a long string to a file?
Edited by lizby 2018-11-30
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 05:48pm 28 Nov 2018
Copy link to clipboard 
Print this post

  Quote  Is there a similarly simple way to write a long string to a file?


Yes, but for some reason it didn't make the last manual update - now included.

2018-11-29_034705_Pi-cromite_Manual.pdf

open "filename" for output as #n
longstring print #n,ls%()
close #1
Edited by matherp 2018-11-30
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 07:02pm 28 Nov 2018
Copy link to clipboard 
Print this post

What am I doing wrong here?



This statement read a file of 3957 bytes into the long string.
system "cat geotmpl4.html",a%()

But then I couldn't print it. I've been able to process the long strings read in this way.

Edited by lizby 2018-11-30
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 07:16pm 28 Nov 2018
Copy link to clipboard 
Print this post

  Quote  What am I doing wrong here?


longstring print #1,a%()
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3018
Posted: 09:47pm 28 Nov 2018
Copy link to clipboard 
Print this post

Bingo! Thanks.

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5914
Posted: 10:22pm 28 Nov 2018
Copy link to clipboard 
Print this post

  lizby said   Thanks. I already have the window from top to bottom of screen. Does MMEdit preserve the output so one could scroll back? I'll test it.

MMEdit works as you want provided you are using the serial port option.
MMEdit can't do SSH.
You could try installing TELNET server on the Pi but MMEdit still might have problems as it only does RAW, not true telnet.

Have you tried TeraTerm?

Jim

VK7JH
MMedit   MMBasic Help
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 11:26am 29 Nov 2018
Copy link to clipboard 
Print this post

Is there any way to do the autorun using SSH wirelessly or using the USB Cable?
I've got the MM so I can run the program remotely by SSH using Terra Term or Putty and the program will stay running when it's disconnected
I'd just like it "if" it was possible to auto restart if there was a power cut
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 11:36am 29 Nov 2018
Copy link to clipboard 
Print this post

  Quote  Is there any way to do the autorun using SSH wirelessly or using the USB Cable?


Yes: see appendix G of the manual
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 12:28pm 29 Nov 2018
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Is there any way to do the autorun using SSH wirelessly or using the USB Cable?

Yes: see appendix G of the manual


I actually have read it fully
I cannot get the autostart working because my usb cable connects using SSH not as a serial port
I can't get it working as a serial port
hence why I asked if it could be done using SSH
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 12:49pm 29 Nov 2018
Copy link to clipboard 
Print this post

The method described works using SSH wirelessly. This is a new appendix make sure you are using the latest manualEdited by matherp 2018-11-30
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 425
Posted: 04:09pm 29 Nov 2018
Copy link to clipboard 
Print this post

Hi

  matherp said   Please find attached version V5.05.01 of the Pi-cromite software. This brings the numbering back in line with the MM2/MM+



Have you install gps functions in futur, like in H7 ??Edited by goc30 2018-12-01
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 09:38pm 29 Nov 2018
Copy link to clipboard 
Print this post

I've followed the instructions in the latest Picromite manual exactly
I actually had before I posted here, I do try things before asking for help and I do search to try and find the answers before asking

I'm getting this when the Pi Zero W reboots

pi@raspberrypi:~ $ screen -D -r
There is no screen to be detached.

To make sure I hadn't completely messed it up over the past 2 weeks trying
I downloaded the latest version of Stretch Lite and installed it completely from scratch.
Followed the instructions to the letter in the appendix and I still get the exact same thing.

With MM running on the Pi after manually starting Screen first I can start my weather program with no problems and it displays with no issue
I can close Putty and reconnect it again and the program stays running
but
I cannot press Ctrl Z to exit MM while the program is running
and the Screen does not autorun on boot and I have edited the correct file in the correct location
I have tried doing it both ways, one using File explorer direct on the Pi and also direct on the Pi through the commands while it's running
But it won't run
and I did do the chmod +x start.bash command
 
MikeO
Senior Member

Joined: 11/09/2011
Location: Australia
Posts: 275
Posted: 09:51pm 29 Nov 2018
Copy link to clipboard 
Print this post

Lew, I am sure that Peter will answer but you don't need the -d when using the Screen command to attach. So its Screen -r to bring up your working session and Screen -d to close (or detach from it). Look up the Linux Screen command in Google there are also a couple of Utube videos I found that help to explain things a little. I had these issues at first but it does seems to work well when you get the drift.

Mike
Codenquilts
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 10:01pm 29 Nov 2018
Copy link to clipboard 
Print this post

Have you put the command in /etc/rc.local after the exit 0? It must be before - sorry should have been clearer on this.

  Quote  I cannot press Ctrl Z to exit MM while the program is running


Use ctrl-C to stop the program then ctrl-z to exit mmbasic
 
     Page 1 of 4    
Print this page
© JAQ Software 2024