Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:56 01 Aug 2025 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 : Can I save a screen image using a micromite backpack

Author Message
snarf
Newbie

Joined: 16/03/2020
Location: Australia
Posts: 4
Posted: 08:06pm 30 Apr 2020
Copy link to clipboard 
Print this post

I am making a project with the Micromite Backpack V2 with the latest version of MM basic.

This is my first programming project and am still coming to grips with MMBasic.

The screen displays various values but has a cumulative graph for upto 10 hours. At times I need to switch to another screen to make and save PID value adjustments, then switch back to the main screen. If I can save a screenshot before switching to the adjustment screen, I could load it again when I switch back so not loosing the historical graph.

Haven't come to grips with arrays or saving data to eeproms, and was wondering if the was a simple answer? I see a SD card holder under the screen.

Ant help would be appreciated.

Thanks, snarf
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 08:44pm 30 Apr 2020
Copy link to clipboard 
Print this post

I think you would need MM Plus. Download the MM Plus manual. Look at Pg 41. You can also save Bitmap to SD card.

I sent you a PM look in your inbox.
Edited 2020-05-01 07:56 by palcal
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 10:47pm 30 Apr 2020
Copy link to clipboard 
Print this post

  snarf said  wondering if there was a simple answer?


I think on your present equipment there's no hope for saving a screen shot and restoring it. Probably best to figure out how to save the data needed to re-create the screen.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5089
Posted: 11:49am 01 May 2020
Copy link to clipboard 
Print this post

Hi snarf,

The backpack V2 uses a 28pin MX170 chip running MMbasic2.
In MMbasic2 there is no simple way to make use of the SD card. Matherp wrote a Cfunction that can be used to write data to the SD card but there are limitations.

AFAIK there is no way to take a screenshot in MMbasic2.

If you draw a graph on the screen you do that from numerical data in your PID controller. This numeric data can be extracted through the serial port. The same connection you use to program the chip.

Example: create an array of the last feedback values (feedback represents the actual output of the PID algorithm).
As part of your program you could (on key press) simply print all the 100 values (to the serial port).


dim feedback(100)

......

if inkey$="d" then
for i=1 to 100
print feedback(i)
next i
end if


Your PC could log the values in a "values.csv" file that can be read in Excel.
Excel can make you the nice graphs.

You can make your file as large as memory allows, capturing as much of the process as required.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 06:21pm 01 May 2020
Copy link to clipboard 
Print this post

Get to grips with arrays, they aren't difficult

Lets assume you are writing to the array with time on the X axis. As you are writing data to the display save the data to an array in an element representing the x-coordinate with a value equal to the Y coordinate. Then after you have done your pidding just write each element back to the display.


dim x%(319)
......
'logging here
x%(column_number)= row_number


sub restore
for i=0 to 319
pixel i,x%(i)
next i
end sub
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 10:29pm 01 May 2020
Copy link to clipboard 
Print this post

Matherp wrote
           
  Quote  Then after you have done your pidding

Haven't heard of "pidding" before, what does it mean.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 10:37pm 01 May 2020
Copy link to clipboard 
Print this post

It's about "PID value adjustments".

John
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 10:38pm 01 May 2020
Copy link to clipboard 
Print this post

  palcal said  Matherp wrote
           
  Quote  Then after you have done your pidding

Haven't heard of "pidding" before, what does it mean.


Reread the first post

He wants to use another screen to change PID values, hence PIDing


Edit:
John beat me - too slow typing!
Edited 2020-05-02 08:39 by TassyJim
VK7JH
MMedit
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 11:02pm 01 May 2020
Copy link to clipboard 
Print this post

OK got it. Maybe I would have understood PIDing.
Edited 2020-05-02 09:04 by palcal
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 11:06pm 01 May 2020
Copy link to clipboard 
Print this post

  palcal said  OK got it. Maybe I would have understood PIDing.

Cold and wet here today so PIDdling is more like it.
VK7JH
MMedit
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 11:52pm 01 May 2020
Copy link to clipboard 
Print this post

Sunny and 30 degrees here.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 12:59am 02 May 2020
Copy link to clipboard 
Print this post

  palcal said  

Haven't heard of "pidding" before, what does it mean.

I guess it is like the Plusing some kids did in Primary School.

Some also said they got the wrong answer even they Plused the numbers...
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 01:14am 02 May 2020
Copy link to clipboard 
Print this post

Yeh, I looked it up in the dictionary then Mr Google didn't know so thought I would ask.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
snarf
Newbie

Joined: 16/03/2020
Location: Australia
Posts: 4
Posted: 06:44am 02 May 2020
Copy link to clipboard 
Print this post

Hey Guys,

Thanks for all of your advice and confirming that there is no "easy way".

Matherp, I should take the next step, and make sense of arrays.  I see your suggestion as a good solution.

Once the PID values are OK, I shouldn't need to access the adjustment screen again (I hope), hence was hoping for a simple screen shot/restore answer.

Again, thanks, and hope you are all managing & keeping well.

Social distancing being relaxed a little here today in Qld, Aust.  Got to hug the grandchildren.

Rod
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 02:26pm 04 May 2020
Copy link to clipboard 
Print this post

  Volhout said  The backpack V2 uses a 28pin MX170 chip running MMbasic2.
In MMbasic2 there is no simple way to make use of the SD card. Matherp wrote a Cfunction that can be used to write data to the SD card but there are limitations.

Where can I find this function? And some usage info.
I understand about limitations, but it might satisfy my needs.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 02:45pm 04 May 2020
Copy link to clipboard 
Print this post

Maybe https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=12013

Into a web search I put
matherp thebackshed cfunction sd read write

There were more results in case that's not the one.

John
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 03:10pm 04 May 2020
Copy link to clipboard 
Print this post

  JohnS said  Maybe https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=12013

Looks like it. Thanx, John!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 03:43pm 04 May 2020
Copy link to clipboard 
Print this post

Hope it works :)

John
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025