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 14 of 16 | |||||
Author | Message | ||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
Pi 3 B V1.2 and MM.DEVICE$ reports A02082 - same as yours. With the default settings ( no options set), I measure 100mS bit length. Jim VK7JH MMedit MMBasic Help |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
Playing with a USB TTL adapter The SYSTEM command can be used to change the baud rate of the attached adapter. The adapter defaulted to 9600 baud and was successfully changed. I haven't tried any other options with the stty command. Changing baud rate should be enough for most users. The stty settings seem to be 'sticky' but I would put them in my program 'just in case' I tried to run SYSTEM "dmesg | grep tty" from the mmbasic prompt but was kicked out of mmbasic with an error. Edit : The previous post should read 1mS bit length, not 100mS. We are not THAT slow down under. VK7JH MMedit MMBasic Help |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
Correct, they are in normal binary representation "Save" in the editor moves the program from the edit buffer and "saves" it in normal RAM ready for execution. Unlike the Micromite, the Raspberry Pi always has a SD card available so, to save for next time, it is just a matter of saving to disk once you have exited the editor. Thanks Jim, your Pi obviously works perfectly, I somehow need to track down the difference in my setup. Do you have an HDMI monitor connected? |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
Raspbian Jessie Lite without any keyboard or monitor. I only ever connect with Teraterm (or WinSCP). Jim VK7JH MMedit MMBasic Help |
||||
hitsware Guru Joined: 23/11/2012 Location: United StatesPosts: 535 |
@ Tassy Jim Precisely which PiMiteBasic download are you using ? I haven't kept up, and the latest ones give me screen garbage :( I want to try what you did but with MIDI baudrate . |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
# Later releases use an additional library Try installing [code]sudo apt-get install libncurses5-dev[/code] This change was introduced on page 14 of the thread to support the EDIT command in full colour |
||||
hitsware Guru Joined: 23/11/2012 Location: United StatesPosts: 535 |
Thank You matherp .... Same problem goes back to 5.3.a23 .........a22 OK Pi 3 w/hdmi/keyboard/mouse to start : (term) $ cd /home/pi/Downloads $ chmod +x mmbasic $ ./mmbasic |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
you must use sudo ./mmbasic |
||||
hitsware Guru Joined: 23/11/2012 Location: United StatesPosts: 535 |
Do not need 'sudo' up to (including)a22 If I use it now takes me nowhere (back @ prompt) ??? |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
You definitely need sudo now. I've had this issue with going to the @ prompt and it is probably that .options has been corrupted with the failed starts So: make sure you have version 64 of pigpio installed (2nd post page 19) delete mmbasic delete .options reboot recopy mmbasic run with sudo If you change versions ALWAYS delete .options before running any new version |
||||
hitsware Guru Joined: 23/11/2012 Location: United StatesPosts: 535 |
DdduuuuuuuuuhhH .................. Where do I find " .options " |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
Same place as mmbasic. It is a hidden file just go rm .options and Linux will prompt for confirmation |
||||
hitsware Guru Joined: 23/11/2012 Location: United StatesPosts: 535 |
O.K........ Worked once but wouldn't work again I hadn't rebooted When I tried, RPi wouldn't boot (someways contaminated SD) Lucky I had spare SD Request: way to break out of running loop ..... Like Ctrl-Break in GW-Basic I seemed to be writing to synth, but no sound ???? Nice ...... I will dance at your wedding |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
ctrl-C ? Then use ctrl-Z to exit mmbasic Never just close the terminal session without exiting mmbasic or the program will be left running and you will have to "kill" the mmbasic processes (2) or reboot before you can run it again |
||||
hitsware Guru Joined: 23/11/2012 Location: United StatesPosts: 535 |
> ctrl-C ? Right ..... I've forgotten my MM stuff > make sure you have version 64 of pigpio installed (2nd post page 19) > delete mmbasic > delete .options > reboot > recopy mmbasic ( re - unzip ? ) > run with sudo All between each session ? |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
No only when you install a new version. Always start mmbasic with sudo ./mmbasic and always exit mmbasic with ^Z If mmbasic has crashed, you might have problems restarting mmbasic in which case restarting the Pi will help (just like with Windows programs) With the more recent versions on mmbasic, I get fewer crashes and mmbasic seems to be better at recovering. Jim VK7JH MMedit MMBasic Help |
||||
hitsware Guru Joined: 23/11/2012 Location: United StatesPosts: 535 |
System "stty -F /dev/ttyUSB0 31250" OPEN "/dev/ttyUSB0" FOR random AS #5 ' open the serial port PRINT #5, "HELLO!!! Is anyone out there?" Thank You Jim ..... While you're handy (you answered this long ago but I don't remember and can't find with search) What do I do with the PRINT to simply send integer bytes ? Maybe Matherp will do a WRITEBYTE or PRINTBYTE ? |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5913 |
don't forget to suppress the cr with ; VK7JH MMedit MMBasic Help |
||||
RonnS Senior Member Joined: 16/07/2015 Location: GermanyPosts: 120 |
hello Peter, hello at all, good news,.. my code for a PiCromite Remote Control is running an working - Once to test the possibilities using option wavetime 1.3 to tweak the pulselenghts it now working together with all my "Smartwares" Unites and a cheap 12V Ledstripe Controller, see my old smart home thread too regards Ron 2017-06-23_170310_PCRC_W.zip |
||||
jman Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Hi Peter I have the same version PI3 as you A22082 Serial out is garbled but if i use OPTION WAVETIME 1.128 the program in memory gets erased. If i reload the program and run it it gets erased. To resolve the issue i deleted the options file reboot then it works. Readding the OPTION WAVETIME 1.128 produces the same wierdness Regards Jman |
||||
Page 14 of 16 |
Print this page |