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 : SD card not found.
Author | Message | ||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
And I know it's because it's not inserted..... Is there a simple one line test I can add to check for this state & jump over the logging routine? Thanks Phil. Edit:- have tried, Edited 2020-02-12 14:58 by Phil23 |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5900 |
Depending on the device you are using ON ERROR SKIP should be what you need. Use it just before you open the file and skip over the save routing if there is an error. Jim VK7JH MMedit MMBasic Help |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
Hmmm, Maybe I should just RTFM a bit better. |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
Option error continue fixed it. On page 52 of my 5.4 manual. Thanks for the Quick reply & also see you are looking on the CMX forum again. Curious, what is your Davis VP Clone? |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5900 |
A micromite. My Fine-offset system died again so I used the wind and rain sensors and built the rest. The Davis protocol is well described so I went with that. Hard wired because I hate batteries. I am in the process of adding my SDS011 to the mix. I can use the extra-sensors fields to get the data from the micromite into Cumulus (running on a RPi) and from there, I run a Windows program that interrogates a modified realtime.txt file. I intended to have history saved on the micromite to cover reboots but that is something still on the gunna-do list. Jim VK7JH MMedit MMBasic Help |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1985 |
Use a Winbond Flash memory - so easy to work with and up to 16MB for around $1... should be plenty(?) You need the SPI and a free pin for the Chip Select Edited 2020-02-12 20:55 by CaptainBoing |
||||
goc30 Guru Joined: 12/04/2017 Location: FrancePosts: 425 |
I give you an exemple of my prog who use "sprites functions" in this sub, I test first if two files exist, and after if prox can use sprite function '--- test if files exist dim flgsprit as integer dim flgsdcard as integer dim numtyp as integer flgsprit=0 flgsdcard=0 numtyp=0 if MM.INFO$(SDCARD)="Ready" then flgsdcard=1 if MM.device$="Pi-cromite" and instr(MM.INFO$(LCDPANEL),"HDMI")=0 then numtyp=9 'if pi and lcd on SPI no sprites and no texte transparent ON error ignore 'this also raz errno txt1$=dir$("image4c.bmp",file) 'files "Image4c.*" ON error ABORT if mm.errno=0 then flgsprit=1 end if ON error ignore txt1$=dir$("logom4.png",file) 'files "Image4c.*" ON error ABORT if mm.errno=0 then flgsprit=flgsprit+1 end if if flgsprit<2 then if (flgsprit<=0 and flgsdcard=0) then print "*** SdCard for Sprite function is not present ***":txt="No files for Sprites" if flgsprit=1 then print "*** 1 File missing for Sprite function ***":txt="1 file need for Sprites" print "*** Function Sprite NOT aviable ***" else if numtyp=9 then print "- Function SPRITE not aviable on Rpi with SPI LCD " txt="Sprites NO" else print "- Function SPRITE aviable " txt="Sprites OK" end if end if |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
The Davis protocol is well described so I went with that. I am in the process of adding my SDS011 to the mix. I can use the extra-sensors fields to get the data from the micromite into Cumulus. The idea of getting extra sensors via a micromite has always been in my mind, but I consider it way beyond my capabilities. In my case the first thing I'd need would be a compatible transmitter module; which are out there, but I next get lost in the region/frequency specs. Presume if I did get the right radio unit it would need to broadcast as Station 2. You now have me wondering how out of reach it is..... with a little assistance. Phil. |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5900 |
I intended to have history saved on the micromite to cover reboots but that is something still on the gunna-do list. Jim Use a Winbond Flash memory - so easy to work with and up to 16MB for around $1... should be plenty(?) You need the SPI and a free pin for the Chip Select I am using EERAM. The saving to backup is done. When Cumulus starts up, it requests the backup data. It's that part I haven't finished yet. Considering that I restart the RPi once a year, it is not a high priority. Phil, I am not using a separate setup for the extra sensors. The Davis protocol has space allocated for 7 extra temperature sensors in the original data packet. One byte each. I am going to use 4 of them for my PM2.5 and PM10 data. I had thought about pretending it was solar data so I could use the builtin graphs but decided to save that for when I do add true solar sensors. Jim VK7JH MMedit MMBasic Help |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
Hi Jim, What I had in mind was more about building my own sensor suite or ISS Transmitter with a Micromite for the extra sensors & put a few more temps & the AirQual monitor on there. Not 100% sure how it would all work out, but in theory it might be doable. My original VP2+ with all it's stuff on station 1 & the Micromite broadcasting as station 2. Have you seen this thread? VP2 Relay Device It contains a lot of good data, much of which I haven't really digested. Cheers Phil. Edit:- I had thought about pretending it was solar data so I could use the builtin graphs but decided to save that for when I do add true solar sensors. Jim It's probably not too hard to add the extra graphs in separate in the JS file that uploads to the web. I've played a bit in there with little Java knowledge & I think It would just need a bit of cut & paste of the original Temp block & then a change to a few of the HighCharts settings in that block to make it look like the solar graph. Did have a bit of a laugh on the weekend, discovered the Water NSW has updeated their charts with a new look. They have started using HighCharts, which Cumulus has had for years. Edited 2020-02-13 15:27 by Phil23 |
||||
Chopperp Guru Joined: 03/01/2018 Location: AustraliaPosts: 1032 |
if MM.INFO$(SDCARD)="Ready" then Thanks goc30 for that snippet. I was also having fun detecting cards than I remembered this thread & re-read it. Brian ChopperP |
||||
Print this page |