![]() |
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: AustraliaPosts: 4 |
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: AustraliaPosts: 1993 |
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 StatesPosts: 3378 |
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: NetherlandsPosts: 5089 |
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 KingdomPosts: 10310 |
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: AustraliaPosts: 1993 |
Matherp wrote 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 KingdomPosts: 4044 |
It's about "PID value adjustments". John |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
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: AustraliaPosts: 1993 |
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: AustraliaPosts: 6283 |
Cold and wet here today so PIDdling is more like it. VK7JH MMedit |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
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: AustraliaPosts: 1667 |
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: AustraliaPosts: 1993 |
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: AustraliaPosts: 4 |
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: UkrainePosts: 161 |
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 KingdomPosts: 4044 |
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: UkrainePosts: 161 |
Looks like it. Thanx, John! |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
Hope it works :) John |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |