Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 20:45 24 Apr 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 : Introducing the Pi-cromite: first steps

     Page 16 of 16    
Author Message
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 06:50am 06 Jul 2017
Copy link to clipboard 
Print this post


For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 07:49am 06 Jul 2017
Copy link to clipboard 
Print this post

Is OPTION CLOCK xx the 'meaningful' way around? It seems 'opposite' to me (probably just me!)

If MMBASIC is wanting to use PWM on Pin 12 then OPTION CLOCK PWM seems to make more sense (this is just my way of thinking - technically you are most likely correct).

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
RonnS
Senior Member

Joined: 16/07/2015
Location: Germany
Posts: 120
Posted: 09:42am 06 Jul 2017
Copy link to clipboard 
Print this post

Hello Peter thats simply brilliant, it makes many things so simple.
Only 3 program lines are still needed to display the system temperature, for example
I got my SRF stick from CISECO with Jim's test program to run,This is now listening to my existing 868 mhz communication. The stick is connecting via USB !
simple testcode using a 4Zoll TFT:
' serial test program
DIM INTEGER systempa(10)
FONT 1, 3 ' Set the default font
BOX 0, 0, MM.HRes-5, MM.VRes-5, 3, RGB(RED), DBlue

OPEN "/dev/ttyACM0" FOR random AS #5 ' open the serial port
' PRINT #5, "aBBLEDON" 'switch the heater off
do
recdata=0
DO ' prefered way to recieve serial data which might not be there!
k$ = INPUT$(1,#5)
IF k$="" THEN
nodata=nodata+1
ELSE
recdata = recdata+1
result$=result$+k$
'PRINT ASC(k$),result$
TEXT 100, 75, TIME$
TEXT 100, 130, result$
nodata=0
ENDIF

LOOP UNTIL recdata > 7
close #5 :result$="":TEXT 100, 150, result$
pause 200
tempcontrol
OPEN "/dev/ttyACM0" FOR random AS #5 ' open the serial port
loop

sub tempcontrol
System "vcgencmd measure_temp",systempa()
text 90, 200, "SysTemp:"+LGETSTR$(systempa(),5,7)
end sub


many thanks to peter an all others who share their experiences here
RonEdited by RonnS 2017-07-07
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 01:34pm 06 Jul 2017
Copy link to clipboard 
Print this post

@matherp

I have version 7 loaded. Removed options. Starts up ok.
BUT, when I try to configure the IPS, it tells me Pin 18 is reserved on startup.

Was going to configure IPS to begin with (and touch) to ensure my existing stuff ran ok - but can't get past this. Any ideas?

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 02:29pm 06 Jul 2017
Copy link to clipboard 
Print this post

Every valid I/O pin is 'Reserved on startup'

pigpio v64 (method 2) installed as per instructions (along with 'rm .options'.

Has anyone else got 5.4.07 running? I may try version 6 (which I bypassed) to see if that works here.

On a PiZeroW with latest Raspbian (plus GUI).

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 03:23pm 06 Jul 2017
Copy link to clipboard 
Print this post

IMPORTANT TO NOTE:
For anyone struggling with version 5.4.06, or later, in terms of getting continuous 'Pin reserved on startup' error messages; you MUST set up OPTION PINS prior to doing anything!


For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 03:32pm 06 Jul 2017
Copy link to clipboard 
Print this post

@matherp

Am now able to test 5.4.07 now that I have issued the OPTION PINS command (so ignore my email just sent!)

Anyway, two immediate things (with I2S configured as per your example on bottom of previous page):

1> GUI TEST LCDPANEL draws painfully slowly (4" IPS set up)

2> If you type OPTION LIST with a leading space then MMBASIC thinks you are wanting to load OPTIONS.bas (recommend stripping leading spaces prior to working out what command is entered)

I will begin thorough testing of these excellent new features at a more humane hour!

Thanks again for these excellent features. By the way - have you had a chance yet to test IR?

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 09:31pm 06 Jul 2017
Copy link to clipboard 
Print this post

  Quote  you MUST set up OPTION PINS prior to doing anything!


Sorry left the default in a diag mode. Fixed in this version - no change in number

2017-07-07_073014_mmbasic.zip
 
RonnS
Senior Member

Joined: 16/07/2015
Location: Germany
Posts: 120
Posted: 11:28am 12 Jul 2017
Copy link to clipboard 
Print this post

hello at all .....i've found out:

If you have noticed that the MMbasic process stops when you close your Putty window you can solve this problem by starting MMbasic over "screen"

install this with

sudo apt-get install screen

then Type screen and open your MMbasic as usual
if you close Putty or disconnect the Raspberry, MMbasic will continue

you can "reconnect"to this process with open a new CLI and type :

screen -D -r

for further details see link

regards RonEdited by RonnS 2017-07-13
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 03:54pm 12 Jul 2017
Copy link to clipboard 
Print this post

......I got my SRF stick from CISECO...


Hi,

Seems that ciseco vanished from the market.
Does anybody know an alternativ stick with this functionality?

THX..
 
RonnS
Senior Member

Joined: 16/07/2015
Location: Germany
Posts: 120
Posted: 09:35pm 19 Jul 2017
Copy link to clipboard 
Print this post

Share your Picromite *.bas files easily with your laptop and edit them with MMedit



As mentioned above, we use Samba to provide the network directory. The installation is done using the following command lines.

-------------------------------------------
sudo apt-get update
sudo apt-get install samba samba-common-bin
-------------------------------------------

After installation we are ready to customize the configuration files and call "Nano" as the text editor.
-------------------------------------------
sudo nano /etc/samba/smb.conf
-------------------------------------------

edit to:
workgroup = WORKGROUP 'WORKGROUP is the name of you workgroup i can be diffrent
wins support = yes

choose your mmbasicfolder:
cd /home/pi/mmbasic 'as an example , choose your path

and make a new folder like this:
mkdir pi-share

edit the samba config again:
sudo nano /etc/samba/smb.conf

and add these Lines to the end:
[Pi-Share]
comment=Raspberry Pi Share
path=/home/pi/pi-share
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=yes

set a samba-password for this network:
sudo smbpasswd -a pi

save all and restart the rasberry after you thold see your RasberryPI in you "Workgroup"
now you can open mmedit and browse to your Raspberry mmbasicfolder und edit files with mmedt and save them there

if you dont see the Raspberry use WinSCP( as an example) to check / edit the permissions of your folders and files

I hope this makes your work with the RaspberryPi even more joyful

regards Ron



 
srnet
Senior Member

Joined: 08/08/2014
Location: United Kingdom
Posts: 164
Posted: 01:10am 29 Jul 2017
Copy link to clipboard 
Print this post

I have MMBASIC running on a Pi2 and I can run a simple Blink program.

I then moved onto trying to run some of the programs I had written for a SPI device, the Semtech SX1278.

The SPI is started with;

SPI OPEN 10000000, 0, 8

And this causes an error;

[158] SPI OPEN 10000000, 0, 8
Error: Already open.

There is only one SPI OPEN in the program.

What am I doing wrong ?


$50SAT is Silent but probably still working.
For information on LoRa visit http://www.loratracker.uk/

 
RonnS
Senior Member

Joined: 16/07/2015
Location: Germany
Posts: 120
Posted: 09:23am 29 Jul 2017
Copy link to clipboard 
Print this post

hi srnet , in an earlier version the spi works for me
im in time back from hollidays so i couldnt test it

me message to PeterM

I have found a way of communicating directly via the Linux_desktop with the PiCromite. The tool is called GTK (+).It provides various GUI's and can also open a window to the output Please see these examples https://developer.gnome.org/gtk3/stable/ch03.html
It should be possible the MMbasic with GKT (+) cooperates !? . I've found it yesterday and will test it once, im an old man and it could take time .
what do you think about it ?

regards Ron
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 302
Posted: 06:00pm 06 Aug 2017
Copy link to clipboard 
Print this post

When an RPi is running MMBASIC, the very first post mentioned a speed about 6 times faster .....

What is PWM spec range, for the Micromite it is 20 to 500,000 Hz, is it possible to get much wider range on the RPi?

I have searched and read all the pages in this topic but I may well have missed out on something like a specifications file. I do forget very easily too.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 08:48pm 06 Aug 2017
Copy link to clipboard 
Print this post

See post on page 6
 
srnet
Senior Member

Joined: 08/08/2014
Location: United Kingdom
Posts: 164
Posted: 09:17pm 06 Aug 2017
Copy link to clipboard 
Print this post

  srnet said   I have MMBASIC running on a Pi2 and I can run a simple Blink program.

I then moved onto trying to run some of the programs I had written for a SPI device, the Semtech SX1278.

The SPI is started with;

SPI OPEN 10000000, 0, 8

And this causes an error;

[158] SPI OPEN 10000000, 0, 8
Error: Already open.

There is only one SPI OPEN in the program.

What am I doing wrong ?



Any clues as to why I get this error ?
$50SAT is Silent but probably still working.
For information on LoRa visit http://www.loratracker.uk/

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 05:52am 07 Aug 2017
Copy link to clipboard 
Print this post

Away at the moment but will try and test later this week. Make sure you don't have any options set
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 04:23am 09 Aug 2017
Copy link to clipboard 
Print this post

Just tested this and it works fine for me.

Please make sure you are using the latest version of the software

2017-08-09_142146_mmbasic.zip

and make sure you delete the .options file before running

rm .options
 
srnet
Senior Member

Joined: 08/08/2014
Location: United Kingdom
Posts: 164
Posted: 12:27am 11 Aug 2017
Copy link to clipboard 
Print this post

I got it working, I had not appreciated that you had to start MMBasic, then delete the options file and then load a program.

I did notice that if you quit from MMBasic and then restart it, it behaves as if the option file exists, although its not there.

I have written some LoRa code in Arduino, but I wanted something more user and language friendly to use my Pi Mikrobus shield with. I thought of Python of course but it runs like a dog.

For the comparision I timed a program that reads and prints to console the contents of the SX127x LoRa device registers, there are 128 of these in the SPI device.

The timings were;

Arduino Pro Mini 8Mhz, 0.031Seconds
Pi 2 Mikrobus HAT,900Mhz and Python, 7.44Seconds
Pi 2 Mikrobus HAT,900Mhz and MMbasic, 0.19Seconds

So in my view Python on the Pi is un-usably slow but MMbasic is OK.









Edited by srnet 2017-08-12
$50SAT is Silent but probably still working.
For information on LoRa visit http://www.loratracker.uk/

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 12:33am 11 Aug 2017
Copy link to clipboard 
Print this post

Time to close this thread - please see a new thread for the first release including DOCUMENTATION

Please do not post to this thread going forwardEdited by matherp 2017-08-12
 
     Page 16 of 16    
Print this page


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

© JAQ Software 2024