|
Forum Index : Microcontroller and PC projects : MMBasic 5.4 Requests
| Page 1 of 2 |
|||||
| Author | Message | ||||
| Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Haven't seen a current thread so thought I'd start one. Few simple things that may already be work in progress. NAME or RENAME for files. NAME "Cur_File.txt" AS "New_File.txt" COPY File. COPY "Cur_File.txt" AS "New_File.txt" And although Geoff's mentioned file transfers in another post; The ability to send a file from the SD card to a client like Tera Term or MMedit. XMODEM SEND Filespec$ XMODEM SEND "Logfile.csv" or XMODEM SEND "\Logs\DaysData.csv" And the other thing I wonder about is a Re-direct or Piping operator. A bit like the old DOS functionality if > & |. Not sure if it's a useful idea or not, it came to mind while looking for certain solutions so thought I throw it out there As in Dir > Dirlist.txt & Dir | more etc. IE Files "Test*.Txt | Variablename$ Loads the output of the files command to the variable$. May or may not be useful to capture the output of command that report to the console. Cheers Phil. |
||||
| GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
Maybe some nice commands to help out with radio transceivers perhaps? Say, the NRF24L01+? I'm still having fun trying to get my head around SPI commands... Cheers, GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
MicroBlocks![]() Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
GTG, Search for the NRF24L01+ library for the arduino. It has all the info needed to get it to work. Translating it to Basic will be tough though as it works best when it is interrupt based. Microblocks. Build with logic. |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9748 |
@ GTG: RF modules are everywhere now, and there are just so many of them, that it is PROBABLY impractical to support any one module. Better to code for the module you need to use. I've had a quick look at these modules, and they are dirt cheap at about one buck each, however, cheapest is not always the best - if fact it is often quite the reverse. IE: Cheap as chips modules can be some of the HARDEST to get going, due either to lack of coherent information, or difficult interfacing protocols.MicroBlocks or matherp would probably be able to get these things talking in their sleep, but for the rest of us..... ![]() I HIGHLY RECOMMEND the HC-12 RF modules . These are also very cheap, but use the standard serial protocol, so interfacing to them is very easy indeed. I have had great success with these, and Rob(Rozee) has even written a cool little GUI application for Windows that lets you easily program them. Smoke makes things work. When the smoke gets out, it stops! |
||||
MicroBlocks![]() Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
I use them a lot with arduinos and they are perfect for many projects. I get about 50m range with just the pcb antenna. They use the same range as WiFi but they have their own way of addressing. With the arduino libraries you get them to work within minutes and i have not a single failure. I think i have used a few hundred so far. One of the things i did was using it as a remote for a model car. Also for controlling stuff in the house. At my time with the makerspace they were the most popular device. I think i have mentioned to add support of this module about two years ago. Not heard a real decision but with the advent of the WiFi modules they became less interesting. I just like the fact that they are NOT on WiFi so no concerns about hacking. Microblocks. Build with logic. |
||||
| srnet Senior Member Joined: 08/08/2014 Location: United KingdomPosts: 164 |
I have seen elsewhere comment that these modules do not implement the CRC checking on packets, is this correct ? If this is so I am at a loss as to why they are used for any serious application, as you cannot be sure that the data you are receiving is actually valid. $50SAT is Silent but probably still working. For information on LoRa visit http://www.loratracker.uk/ |
||||
| robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2461 |
the HC-12 modules implement a transparent half-duplex serial link, nothing more, nothing less. ie, the modules act as if you have a 3-wire RS-232 connection between the two ends (but both ends can not talk at once). it is entirely up to the user to decide what they do with this: you could use it as a simple extension of the console wires, or run over it whatever packet-orientated protocol with error detecting (CRC) that you wish. one application i played with was hooking up an HC-12 module directly to a GPS module sitting outside, then connecting a matching HC-12 to a usb to serial bridge attached to a PC inside. the PC could 'see' exactly what was coming out of the GPS module (strings of ascii data, with checksum) and plot the 'wandering' of the GPS position over time. cheers, rob :-) |
||||
| GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
@Microblocks: I downloaded the Radiohead libraries and had a look at them with a view of trying to port it to MMBasic. I got a headache..... I'll have a look around for other libraries. @Grogster: I'll order a couple of HC-12's and have a play around with them. All, thanks for the info, looks like I've been barking up the wrong tree with transceiver modules... Cheers! GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
MicroBlocks![]() Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
posted in wrong topic, sorry. Microblocks. Build with logic. |
||||
| Zonker Guru Joined: 18/08/2012 Location: United StatesPosts: 772 |
How about some new GUI controls... maybe a slider or knob object... A way to put up a any kind of background "gauge" pix, and the firmware will treat the finished piece as a true integrated GUI readout just like the others.. Screen control handled by firmware... I also liked the code for the moving graph area... (sweet)... |
||||
| srnet Senior Member Joined: 08/08/2014 Location: United KingdomPosts: 164 |
I posted some LoRa routines for MMbasic a couple of years back, and might have developed them further, but the interest level was zero. The LoRa stuff goes around 10 times further than other RF systems and can be stupid long range, is very low power and has a high level of interferance resistance, so perhaps the application range is considered limited. $50SAT is Silent but probably still working. For information on LoRa visit http://www.loratracker.uk/ |
||||
| Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
1-Wire Search? I've tried lots of searches to try find out why it's been dropped & what the issues might be. Also read that matherp has reworked it (Think needs 64 bit int?). and included it in the MMX firmware. If for whatever reasons it's not appropriate to re-include in in the standard MMbasic,(size etc), is it possible to provide it as an Embedded cFunction, like the others provided with the firmware. ChkPin cSub? ChkPin 17 ' Returns the configuration status of the pin. Alternatively, Can the existing ChangePin CSub be enhanced like this? [Code]As an example the following will add an internal pullup resistor to a frequency input pin: SETPIN 15, FIN ' set pin 15 as a frequency input CHANGEPIN 15 ' Report the Status of the pin FIN CHANGEPIN 15, 14 ' add a pullup resistor to that pin CHANGEPIN 15 ' Report the Status of the pin FIN, 14[/code] Cheers Phil |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
There are some good points here and I will have a look at them for the next version. My main comment (as in the past) is that anything added to MMBasic needs to be useful to a good number of people, be something that cannot be done in BASIC and it must fit with the general style and philosophy of the Micromite. Geoff Geoff Graham - http://geoffg.net |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
On reviewing the list I am wondering why you need this. If your program configured the pin why can not your program also keep track of the configuration? Geoff Geoff Graham - http://geoffg.net |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9748 |
Agreed. If you did need to change the configuration of a certain pin(or pins), you could easily do that with flags or strings. SetPin 17,DOUT:PIN17FLAG="DOUT" ... SetPin 17,DIN,PULLUP:PIN17FLAG="DIN" ... SetPin 17,FIN:PIN17FLAG="FIN" ... etc Smoke makes things work. When the smoke gets out, it stops! |
||||
| Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Basically because the program uses an IO map that defines the pins in its own terms. Dout, DoutOC, AIN1-5 for different sensor types; based on the functions they use. One of the other things we are looking at is sharing pins for things like RTC. ATM I have a test unit with status LEDS on pins 17 & 17, they need to be released for the RTC to be read & re-assigned afterwards. That would be much simpler if we could check them first, considering the code only addresses the direct pins at it's core. It's no biggie, but suggestions sometimes help. Phil. |
||||
| Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1667 |
Ok, Conceding now, can done in our code if we check our defined points for the pins we might consider sharing. Probably a case of me "Opening my mouth before thinking too much", Lol. Must be getting dumbed down by some clients who don't RTFM, or click on help; Just prefer to hit the speed dial on their phone..... (Does the printer have paper in it?). Phil |
||||
| GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
It can have all the paper in the world in it but it won't matter a schmick if the power isn't turned on.... GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9748 |
...or the ink nozzles are blocked - something that annoyed me so much last time that happened, I threw the inkjet in the bin and bought a colour laser. (now I just have to wait for the toner to run out!) Smoke makes things work. When the smoke gets out, it stops! |
||||
| GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
(now I just have to wait for the toner to run out!) Amen to that! Chucked the (Insert name brand that rhymes with Kanon) inkjet years ago. The Fuji Xerox color laser that replaced it has done just over 7000 pages now and is still going strong. Great bit of gear.... +1 for a few more GUI controls too, just to keep on topic Cheers! GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
| Page 1 of 2 |
|||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |