![]() |
Forum Index : Microcontroller and PC projects : Pi-cromite V5.4.05 with documentation
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
astro1 Regular Member ![]() Joined: 26/06/2016 Location: AustraliaPosts: 51 |
Hi Peter, Using an I2S DAC with MMBasic works the first time after starting the PI and running mmbasic. After quiting mmbasic the sound no longer works for mmbasic and the PI. Running radio and airplay and mmbasic. Sound works until quiting mmbasic. Then running mmbasic, no sound at all. Thanks. |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2927 |
@astro1 Out of interest, are you setting the OPTION PIN MASK (can't remember the exact command) for the I2S pins again after 'restarting' MMBASIC? EDIT: Just found it: OPTION PINS &HA400000800 |
||||
Peter63 Regular Member ![]() Joined: 28/07/2017 Location: SwedenPosts: 47 |
Hi, matherp I missing a way to send in a default string to the input -command? s$="default string to be edit or not" input"Edit string";s$ print s$ |
||||
RonnS Senior Member ![]() Joined: 16/07/2015 Location: GermanyPosts: 120 |
hi Peter, you can use the GUI Textbox or GUI Numberbox for an input, see the MicromitePlus manual regards Ron |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
input "Edit string";s$ if s$="" then s$="default string to be edit or not" print s$ This is a bug in the way the Pi-cromite code exits where it doesn't respect OPTION PINS. Please try the attached fix (untested) 2017-09-19_094632_mmbasic.zip |
||||
astro1 Regular Member ![]() Joined: 26/06/2016 Location: AustraliaPosts: 51 |
Same issue using latest. seeing this after quitting mmbasic. ./mmbasic: /lib/arm-linux-gnueabihf/libtinfo.so.5: no version information available (required by ./mmbasic) ./mmbasic: /lib/arm-linux-gnueabihf/libncurses.so.5: no version information available (required by ./mmbasic) |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
Don't know why you are seeing the message but suspect it is benign. ncurses is the package I compile with that manages the console I/O. To get rid of the message you can install it: sudo apt-get install libncurses5-dev I'm unable to test I2S DAC at the moment as away from home - will try to look at it at the weekend |
||||
astro1 Regular Member ![]() Joined: 26/06/2016 Location: AustraliaPosts: 51 |
I only see the libncurses message with the latest fix (file size 330KB), size of 5.4.08 is 332KB. Just FYI. |
||||
RonnS Senior Member ![]() Joined: 16/07/2015 Location: GermanyPosts: 120 |
hello Matherp, what do you think about a command to reading an analog Value ? such is available with Python ( as a Library ) by using as an example the "EnviroHat " they are using the ADS1015 4-channel 3.3v, analog to digital sensor (ADC) Link best regards Ron PS: this would make the Picromite fully compatible to mmbasic.. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
Great idea - I've ordered one |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
Please find attached a new version 5.4.09 2017-09-22_141850_Pi-cromite_Manual.pdf 2017-09-22_142121_mmbasic.zip This version includes a new command and supporting function FORK unix_command FORK KILL MM.FORK FORK is similar to SYSTEM except that it is non-blocking and all output from the new process is sent to the null device. This allows MMBasic to run a Linux process in the background MM.FORK returns the process ID of the forked process or zero if no process exists. Only one forked process is allowed at a time. If this all seems rather esoteric then a simple example should illuminate things: SetPin 3,din,pullup 'set up a pin to halt playback Fork aplay gold.wav 'play a wav file using a standard Pi command Do While MM.Fork 'loop while playback continues If(Pin(3)<>1) Then 'check the stop switch Fork kill 'kill the forked process End If Loop Note that the unix command does not need quotes or specific field separators but commas may be used instead of spaces if preferred. Note also that the C-library parser does not accept "-" characters in filenames as these are treated as specific to command syntax. NB: there is a known issue with the Pi-cromite relating to use of the I2S audio. When MMBasic exits I2S audio playback will stop even if started from the Linux command line before MMBasic is run. This is caused by something internal to the PIGPIO C I/F. I have reported this to the author of PIGPIO but it is not something I can fix myself. |
||||
mysli Newbie ![]() Joined: 27/07/2016 Location: GermanyPosts: 11 |
Hi *, I just came accross MMBasic for RPi and wanted to give it a try. I have a RPi2 and just got me the latest copy of Raspbian Lite. I got everything nicely setup, the recent version 5.4.09 of MMBsic starts up, but unfortunately once I am in the basic editor my keyboard is not working anymore. Unplugging/replugging the keyboard does not help. On the Linux bash keyboard works just fine (after a reboot). Does anyone has an idea? I use a standard Cherry USB keyboard. Regards Daniel |
||||
mysli Newbie ![]() Joined: 27/07/2016 Location: GermanyPosts: 11 |
Hi *, meanwhile I figured that actually not just the keyboard is dead, instead the entire RPi locked up. Under certain conditions I get a repeated post of 2018-01-12 19:24:10 gpioTick: pigpio uninitialised, call gpioInitialise() pigpio is installed and a call of pigpiod -v seems to work. pi@raspberrypi:~ $ sudo pigpiod -v 64 pi@raspberrypi:~ $ What is missing/wrong on my RPi? Regards Daniel |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
That happens because you have a previous version still running (two processes). You can only run one copy of MMBasic at a time and should always close it with ctrl-Z What version of Raspbian are you running? Make sure you run the version of MMBasic that is the same. I don't have a Pi 2 so can't confirm it works on one. I also always run headless over SSH so can't comment on the keyboard issue but I know there are others running with a local keyboard and monitor successfully. What do you mean? Do you get the MMBasic command prompt ">" or is the issue when you use the command EDIT? Suggest you run the latest version rather than 5.4.09 UPDATE One more thought - the code assumes that the Pi has an ethernet connection as it opens a socket by default. Don't know what it does if there isn't one. |
||||
mysli Newbie ![]() Joined: 27/07/2016 Location: GermanyPosts: 11 |
Hi * I am absolutely sure running only one instance of MMBasic. Also pigpiod is running in one instance only. The Raspbian verion I run is the latest to download from www.raspberrypi.org, Raspbian Stretch Lite, Nov. 2017 The latest MMBasic version I could find is the one from 2017-09-22. After boot into Raspbian I run the following commands: sudo pigpiod sudo ./mmbasic But no success. Regards Daniel |
||||
mysli Newbie ![]() Joined: 27/07/2016 Location: GermanyPosts: 11 |
Hi * one more thing: I have the Pi connected to ethernet, internet access works fine. Regards Daniel |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6221 |
Daniel, Like Peter, I never use a keyboard on my Pi's so can't help there. The latest versions are in this post: https://www.thebackshed.com/forum/forum_posts.asp?TID=10164&PN=1 As you are using 'stretch', make sure you grab the stretch version. The problem might also be due to the language settings of your keyboard. (That's only a wild guess). Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
That is the issue. MMBasic doesn't use the daemon - don't run it. It is compiled with pigpio so by running the daemon you have the two copies. I've included a note to this effect in the latest version of the manual I posted an update today code + manual |
||||
mysli Newbie ![]() Joined: 27/07/2016 Location: GermanyPosts: 11 |
Hi Peter, I set up Raspbian Stretch newly, got pigpio through apt-get and the latest mmbasic from yesterday. This is what I got: ... 2018-01-13 17:20:04 gpioWrite: bad gpio (117) 2018-01-13 17:20:04 gpioSetMode: bad gpio (117) 2018-01-13 17:20:04 gpioSetMode: bad gpio (80) Segmentation fault pi@raspberrypi:~ $ I tried it as well headless, not HDMI no keyboard connected. I checked the process list before (ps -e) no pigpiod running. Seems like mmbasic doesn't like RPi Rev. 2? Regards Daniel |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
First try cleaning up from previous version of MMBasic You must rm .options and then rerun If that doesn't work please get pigpio from here and install as per the instructions. |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |