FAQ for tha LiveCode raspberryians?

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

danielrr
Posts: 97
Joined: Mon Mar 04, 2013 4:03 pm

FAQ for tha LiveCode raspberryians?

Post by danielrr » Sat Sep 20, 2014 10:29 am

Hi all!

First of all, my thanks and kudos to the people who managed to make LC into the raspberry. This is the most brilliant idea since multi-balls ice creams. I'd like to ask if there's a FAQ page for LiveCode in the Raspberry, or something from which to start.

many thanks in advance,

Daniel

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5963
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: FAQ for tha LiveCode raspberryians?

Post by FourthWorld » Sat Sep 20, 2014 4:48 pm

Perhaps we should make one. Let's start with where we are: what do you need help with?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

danielrr
Posts: 97
Joined: Mon Mar 04, 2013 4:03 pm

Re: FAQ for tha LiveCode raspberryians?

Post by danielrr » Sat Sep 20, 2014 6:27 pm

Some important things I think worth of consideration for a FAQ. Some of them I asked myself before downloading LC for the pi, some of them I'm still thinking about:

- How can I download the latest version of LC for the Raspberry Pi?
- What's the difference between version x and y of LC for the Raspberry Pi?
- How can I install LC on my Raspberry Pi? <-- that's important
- Can I install LC in my model of Raspberry Pi? --here you explain whether there is some model you'd rather don't use with LC
- Those projects I built with LiveCode on my mac/PC, Can I still use them on the Raspberry Pi?
- Are there any memory requirements to install LC on the Raspberry Pi?
- Can I use LC on the Raspberry Pi to receive input or output instructions to external objects like sensors, motors, etc.?
- Where's the manual for LC of Raspberry Pi?
- Are there any constraints in the length of my projects?
- Can I process large quantities of data using LC with my Raspberry Pi?
- What are the merits of LiveCode against, say, Python?


I'll think of some more questions in the following days!

best wishes,

Daniel

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1686
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: FAQ for the LiveCode raspberryians?

Post by [-hh] » Tue Sep 23, 2014 4:30 am

I'm currently working with several IDE's (Kivy, LiveCode, QT Creator, Xojo) and 'pure' XCode/Swift. I don't know where I'll stay at the end of this year. Actually I was already gone from here, but Fraser's engagement for the Raspi made me come back and try to support the start of this 'community only' LC version:

Let me try to give answers to your (not yet frequently) asked questions:

First of all one can use one of the good tutorials (compact to extremely detailed) and the download from http://www.raspberrypi.org to prepare theRaspi.
I recommend (and assume in the following) you install Raspbian (currently Debian Wheezy as of 09-09-2014). With the first startup choose your language and keyboard settings. One of the most important commands is (in LXTerminal)
"sudo raspi-config"
what gives the second startup screen where you can correct/choose your main settings, for example all international settings, or more advanced, for example enable ssh.
Now use your general tutorial to be guided with connecting to internet.
If you have currently no ethernet connection or simple WLAN-USB-stick you can use your M/W/L (=Mac/Win/Linux machine) for downloads and copy the files via USB-stick to your Raspi, all drivers are already there.
Now saying "download" means simply to use a browser, on Raspi or your M/W/L.
  • How can I download the latest version of LC for the Raspberry Pi?
    From http://downloads.livecode.com/livecode/
    the RPi versions (if any), version 6.5.1 is at the bottom of this page.
  • Which version to choose?
    The LC server version needs the same additional knowledge as for every other server platform. If you don't know, start with the community version only.
  • Are there any memory requirements to install LC on the Raspberry Pi? Can I install LC in my model of Raspberry Pi?
    If you have model A (256M RAM), I would prefer to start with LC 6.5.1. Later on (next year?), as soon "widgets" are the state of the art, everything will be less RAM-hungry.
  • What's the difference between version x and y of LC for the Raspberry Pi?
    Currently the LC 6.5.1 version has BGR-colour (blue and red interchanged).
    LC 7 has RGB-colours (not yet the ability for windowshape).
    Also, as with every Linux version, the built-in "backdrop" doesn't work.
    In general: See the release notes for all versions.
  • How do I install LC on my Raspberry Pi?
    Right-click the downloaded (and unzipped) LC installer and choose "properties". Set the executable of it to true (or use the Terminal chmod +x ...). Then right-click again and choose "Execute". My personal preference is to install "for this user" only. The installation runs as everywhere else.
    If you are installing LC 6.5.x (or if you experience problems with a vncserver) you have to add two lines to your /boot/config.txt

    Code: Select all

    ## in Terminal:
    sudo nano /boot/config.txt
    ## add the 2 lines
    framebuffer_depth=32
    framebuffer_ignore_alpha=1
    ## to save type ctrl-O, return, ctrl-X
    sudo reboot
  • Where is it then all gone?
    Open your raspi-file browser (button at bottomLeft) in your home (usually /home/pi) and choose in menu "View" to show hidden files. Now you see the folder ".runrev", that's the container. (You can find there the LC-'app'.) If you install "for all users" the installation goes into /opt/runrev.
  • How do I start LC?
    Currently the installer makes a link in the Application menu, at the very bottomLeft, in submenu "Programming". (To have a 'launching' desktop icon copy the LC desktop file from /home/pi/.local/share/applications to your desktop.)
  • Where's the manual for LC of Raspberry Pi?
    Use the menu "Help" of LC. There you find links to tutorials, a user guide, stack resources ...
  • Those projects I built with LiveCode on my Mac/PC, can I still use them on the Raspberry Pi?
    Germans say "Jein" (a mixture of Ja/Yes and Nein/No). Depends heavily on your usage of resources. You can't load a 1 GByte file into 512 MByte RAM. And very small changes of your code may double speed on your 700 MHz-Raspi-CPU (I use 800 MHz) but have no noticeable effect on your 2.5 GHz M/W/L-CPU.
  • Is it possible to build standalones for the Raspberry Pi?
    Yes. Currently this produces somewhat big files (12 MByte each), but works like a dream.
  • Are there any constraints in the length of my projects?
    No, not from LC. Just from available RAM and disk space.
  • Can I process large quantities of data using LC with my Raspberry Pi?
    Yes again. I already filtered 500 MByte of digits of pi (the real number). You have to stream it, more comfortable as others did who had 24 KByte RAM and a 1 MByte HD available. But you don't have to be in a hurry.
  • What are the merits of LiveCode against, say, Python?
    Each has pros and contras. Depends also on the project. Python has a very large community, including impressively experienced electronic hobbyists and has nearly everything already done for the hardware aspects of the Raspi.
  • Can I use LC on the Raspberry Pi to receive input or output instructions to external objects like sensors, motors, etc.?
    Especially the use of more specialised GPIO pins (I2C, UART oder SPI) is ready-made for Python (you can use these python scripts also from LC). Blinking LED's means simply writing/reading 0/1 to/from special files, directly doable for example from LC (see another post here that explains this). If you try to build a little camera equipped helicopter or a car with a bord computer that is also a NAS-server (seen on a party, where guests could stream from a mini car to their smartPhones) then you better use Python.
    My personal experience is:
    Python is *the* RaspberryPi (Pi=Python Interpreter) language. But it is, whenever needed also usable via LC, may be soon also by special externals. The other way, use of LC via Python is possible, although not this easy.
If you have two pairs of trousers then sell one and buy a Raspberry Pi
(freely after Georg Chr. Lichtenberg).

Some links:
http://www.raspberrypi.org
http://elinux.org/RPi_Hub
http://www.raspberryconnect.com
http://www.raspians.com/knowledgebase-s ... egin-here/
Last edited by [-hh] on Mon Oct 20, 2014 8:05 pm, edited 1 time in total.
shiftLock happens

Kanuth
Posts: 2
Joined: Wed Oct 15, 2014 10:11 pm

Re: FAQ for tha LiveCode raspberryians?

Post by Kanuth » Wed Oct 15, 2014 10:26 pm

Hi, HH;
Not sure which today you are referring to in the last line of your post but it still says today (15 Oct) 'Can't find a child process' for the 7.0.0 I downloaded yesterday. Any thoughts about what might help ? Please be gentle with your response - I'm a senior :)
Take care.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1686
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: FAQ for tha LiveCode raspberryians?

Post by [-hh] » Thu Oct 16, 2014 3:06 am

Sadly this is still correct. I reported this as a bug shortly after the release date. But Fraser's time is presumably needed for other things (Fraser Gordon, member of LC team, creates these unofficial Raspi releases for us in his free time).

You could try to go with LC 7 (rc1) or, if you can live with the false colors display (BGR instead of RGB), use LC 6.5.1 (scroll download page to bottom).
[Also, LC 7 rc2 has some 'hard' bugs on the other platforms, that LC 6.5.1 doesn't have.]

I hope your LC will soon be running. Have a lot of fun!
Kanuth wrote:I'm a senior :) Take care.
Why? And what makes you think I'm not? Perhaps I'm older than you?
shiftLock happens

Kanuth
Posts: 2
Joined: Wed Oct 15, 2014 10:11 pm

Re: FAQ for tha LiveCode raspberryians?

Post by Kanuth » Thu Oct 16, 2014 3:52 am

Thank you, HH, for your response - I'll try 6.5.1. You may well be older although I doubt it. Many responses on forums assume an expertise that I don't have (and actually seem to be more in the vein of trying to impress their peers) and, therefore, are rather useless to me - yours is not. Thanks again.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1686
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: FAQ for tha LiveCode raspberryians?

Post by [-hh] » Mon Jul 27, 2015 10:37 pm

No more "false" colours with LC 6.5 on Raspi B!
With the current Raspbian OS the BGR-colour of the LC 6.5 version disappeared, we have now the usual RGB colour model working.

Code: Select all

## type in Terminal to get the actual version (don't use the Raspi 2 version for Raspi B...)
sudo apt-get update
sudo apt-get upgrade
sudo reboot
shiftLock happens

SparkOut
Posts: 1743
Joined: Sun Sep 23, 2007 4:58 pm

Re: FAQ for tha LiveCode raspberryians?

Post by SparkOut » Tue Oct 31, 2017 10:42 pm

I am looking at trailing after the Raspberry Pi bandwagon - it's a long way ahead of me, so I'm wondering if there is any more up to date info or changes to the FAQ and details provided on this forum about getting installed and running LC apps on the device.

Some advice on what model to start out with would be great too.
TIA

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1686
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: FAQ for tha LiveCode raspberryians?

Post by [-hh] » Wed Nov 01, 2017 12:47 pm

Hi SparkOut.

You are not lost, the LC Raspi-bandwagon is still waiting for the drummer, MaxV recently joined to play the violine.

The (still unchanged) state is:
LC 6.5.1 and 7.0.4 work on Raspi 2/3. You may use another OS (not Raspbian) to have it working. For Raspbian Jessie there is a workaround to have it running on Raspi 3, see
http://forums.livecode.com/viewtopic.ph ... 38#p148267
I use currrently Lubuntu or Xubuntu on Raspi 2/3 (I have four of them working).

LC 6.5.1 is the fastest, runs with all my stacks form the Raspi collection.
LC 7.0.4 is slower (as every LC 7 version) but the only one that allows to create standalones for Raspi.
SparkOut wrote:Some advice on what model to start out with would be great too.
  • Raspi 2B, if you plan to do some 'electronic' work (home automation). Some well known python packages (incl. tutorial) are written for Raspi 2 and are not yet updated.
  • Raspi 3 for more speed. The onboard WLAN-chip is a bit 'weak', I use USB WLAN-modules. The onboard bluetooth-chip is OK and 'just works'.
Hermann
shiftLock happens

SparkOut
Posts: 1743
Joined: Sun Sep 23, 2007 4:58 pm

Re: FAQ for tha LiveCode raspberryians?

Post by SparkOut » Wed Nov 01, 2017 3:19 pm

Vielen dank wieder Hermann!

When you say "weak" for the WLAN, you mean the WiFi signal strength is not great, or that using WiFi causes crashes and/or problems sometimes?

I think I would go for the newer, faster one as I'm not that fussed about the python stuff. What about the Pi Zero W? Is that any good to dabble with or is performance cut down to match the price?

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1686
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: FAQ for tha LiveCode raspberryians?

Post by [-hh] » Wed Nov 01, 2017 6:26 pm

'Weak' means the strength of the signal (sending/receiving).
The Raspi Zero is more for screwing together your own computer (use in your personal weather ballon or quadrocopter).
Raspi 2B runs very stable, needs little power. I use it, together with a simple webcam, for watching the pets of my youngest daughter
( uses Raspi stack #49 http://forums.livecode.com/viewtopic.ph ... 61#p129761 ).
shiftLock happens

SparkOut
Posts: 1743
Joined: Sun Sep 23, 2007 4:58 pm

Re: FAQ for tha LiveCode raspberryians?

Post by SparkOut » Wed Nov 01, 2017 7:14 pm

Vielen Dank Hermann, immer wieder

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1686
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: FAQ for tha LiveCode raspberryians?

Post by [-hh] » Sun Dec 31, 2017 4:12 pm

Find below a valuable contribution of Mark Waddingham given elsewhere for mobile.

It is, TMHO, also applicable for the RaspberryPi.
There are, assuming you are running not headless, also the settings for gpu_mem (increase to 64 and more in /boot/config.txt) of interest.
Mark Waddingham wrote:Optimizing for small Android devices

In terms of images / screen resolution etc...

The first thing to ensure is that *all* your images objects use the
filename property rather than embedding the image data in the stackfile
via the 'text' property.

One exception: if you are constructing images on the fly temporarily
(i.e. for a single card) then the 'text' property is still the best
choice.

The size of the image files on disk is not really relevant - what
matters is the amount of memory they use to render, which is 4 bytes per
pixel. (You can have a 1Kb PNG which has a decompressed size which would
require many gigabytes decompressed, for example).

Filename referenced images are decompressed and cached on use - the size
of the cache is determined by the 'imageCacheLimit' global property, and
its current usage is the 'imageCacheUsage' property - both are in bytes.

If your image cache is too small, then there will be a 'bump' whenever
an image needs to be decompressed - you can ensure images are in the
cache (assuming the cache is large enough) by using the 'prepare image'
command.

The engine understands @ suffixes to image filenames (before the
extension!), which allow you to provide different sizes of images
depending on the device pixel resolution of the device. For example, if
you have lots of images which have been prepared for retina devices,
then they will be being scaled down on lower resolution devices for no
real gain, and will be taking more memory than need be on such devices -
take a look at the (image) filename property in the dictionary which
explains how that works.

By default the engine maps 1 pixel in LiveCode space to 1 logical pixel
in device space. A (original!) retina device will have 2 device pixels
to 1 logical pixel, whereas a non-retina device will have 1 device pixel
to 1 logical pixel. For retina devices you generally want images of 2x
the horz and vert size compared to non-retina to ensure maximum display
fidelity.

So one thing to check is that all your images are not 'oversized' - i.e.
they are the exact size needed to fit the pixel rect of the objects
using them in LiveCode. Then provide @2x ones for higher resolution
devices. Assuming your images are currently 'oversized' to ensure good
display on high-res devices, this will save you 75% of the in-memory
footprint when running on a lower-res device (i.e. not retina).

In terms of accelerated rendering...

The cache of 'tiles' used in acceleratedRendering is per-stack, and is
reset on every card change. The cache is only 'in-memory' when the stack
is opened. On mobile it is possible for more than one stack to be
opened, they stack from most recently opened to least recently opened.
So, in general, it is probably better to explicitly close stacks you are
no longer using. Using the 'go in window' form of the go command (IIRC)
does this for you - i.e. closes the old and opens the new, and is
probably the most efficient means to move between stacks on mobile.

The amount of memory which is used by acceleratedRendering (on any one
stack) is always the compositorCacheLimit of the stack. If the stack
requires more tiles to render than the cache-limit allows,
acceleratedRendering will not be used, and the engine will fall back to
normal rasterization.

On mobile, if you are using OpenGL modes of acceleratedRendering, then
(IIRC) the cache is actually the GPU RAM which is used, and not 'normal'
RAM (if there is a difference these days with more flexible memory
busses!). However, there is an overhead in generating the tiles - but
that is only transient and is never more than the pixel size of the
stack at device resolution (e.g. for a 800*600 stack non-retina - it
would require a maximum temporary buffer of 800*600*4 bytes).

In terms of memory, then the above two things are pretty much the
largest 'memory hog' of any application - unless you are loading large
amounts of data into memory (which I don't think you would be in the
case of your app - we're talking more like doing analysis of 100,000s of
points of data) then any memory issues will likely be due to graphics.
shiftLock happens

SparkOut
Posts: 1743
Joined: Sun Sep 23, 2007 4:58 pm

Re: FAQ for tha LiveCode raspberryians?

Post by SparkOut » Wed Jan 03, 2018 9:15 pm

Happy New Year everyone, and a big thank you to everyone involved in the deployment of LiveCode on Raspberry Pi.
You can guess what my Christmas present was, obviously.
Thanks to LiveCode Fraser for the possibility to use LC on Pi. And the most grateful appreciation of your enormously valuable, helpful information Hermann. Thanks to you I can play with LC on Ubuntu Mate, or Lubuntu or Xubuntu at will. One day this will go beyond playing and become a serious tool, I hope.
(Wouldn't it be wonderful to have Pi as a supported platform for current LC versions?)

Post Reply

Return to “Raspberry Pi”