Not getting Sensor Readings in Pysense with FiPy Module
-
Hello Team,
We have got pysense and fipy module & we are the new to it, so as per the documentation we have updated the firmware for both pysense as well as for the fipy & started programming to read the sensors. We successfully got the values for Ambient light sensor using the code provided in your documentation, but we are unable to read the other sensors,
- Could you please share us the code to how to read other sensors and store the readings in csv file in fipy device memory using Pysense expansion board.
- How to access the inbuilt file structure of FiPy.
- FiPy serial connection with RaspberryPi Compute Module.
Help we be appreciated.
Thank You -
@archana-kadam said in Not getting Sensor Readings in Pysense with FiPy Module:
Could you please share us the code to how to read other sensors and store the readings in csv file in fipy device memory using Pysense expansion board.
This is not good to store frequently changed data to flash (limited write cycles)
but if you really need you can use obvious python codewith open("/flash/myfile.xyz", "ab") as f: f.write(data)for sensors look at library sample
https://github.com/pycom/pycom-libraries/blob/master/pysense/main.pyHow to access the inbuilt file structure of FiPy.
connect to it by ftp - look into online documentation about this basic step
FiPy serial connection with RaspberryPi Compute Module.
search on the forum, e.g.:
https://forum.pycom.io/topic/2514/lopy-to-raspberry-pi-3-serial-connection -
When you say "we are unable to read the other sensors", could you provide more details? Was there an error occuring? If so what did it say?
-

We are not able to fetch the list of files which are stored in the pysense board -
@archana-kadam
Do you use passive mode and do you limit connection to only one?
Many ftp clients use many connection at one time. -
@livius
Yes Passive mode is on and we did not do any limited settings for client connection -
@archana-kadam said in Not getting Sensor Readings in Pysense with FiPy Module:
and we did not do any limited settings for client connection
I do not know if understand this correctly
but you must limit connections to only one a a time in ftp client configbelow is a sample for Filezilla
https://docs.pycom.io/chapter/toolsandfeatures/FTP.html#filezilla -
@livius
How to get current time stamp in fipy module after ejecting and reconnecting again. We tried with utime and rtc examples provided in the pycom documentation, but when we eject the module and reconnect the time is getting reset. how to get only current year,month date and timeThank You
-
@archana-kadam said in Not getting Sensor Readings in Pysense with FiPy Module:
ejecting
By ejecting do you mean remove power competly? Or only deepsleep?
If the first then how do you thing the time can be preserved?
Thing about your wath on the hand if you remove battery and you place it after month do you see current time?
If you are interested in starting time from point before reset - and loosing e.g. month is not problem for you - you can save current time to non-volatile memory. You can usepycom.nvs_setor save data to the SD card or not recommended write it to the flash.Only way to have time - is deepsleep with battery.
-
@livius Using deep sleep via a Pysense, Pytrack or deep sleep shield, you should be able to get the remaining time. If you save the time before going to sleep, and on boot, load that time, add the value of the deep sleep time and subtract the remaining sleep time, you should get an approximate real time.
Haven't tried it yet, and I believe on the Pysense/Pytrack the remaining sleep is slightly off, but it should be possible.
-
@livius
we have made a parts in main.py program. In each part of program we have declared the string and tried combine all the strings into one by giving a time limit of 30 seconds, after two readings we are an error called OSError: [Errno 22] EINVAL .Would you please give us the sloution for this error. I have attached a code also please go through the code0_1520554484439_tempHum.pyThanking You
-
@archana-kadam
you concat strings always and never clear it
string1 +=
you probably consume max buffer.. -
@jcaron
Can you please send us the code to read current time stamp with fipy board -
-
@livius
Thank you for this help now we are getting a proper output. -
We are trying to connect to the station and access media using the procedure given the documentation. We are unable to connect to the accurate station and access point to specified IP address and ssid.
Could you please help to this problemThank You
-
@archana-kadam
Do you mean Wifi?
How your trying looks like? Any sample code. And if this is Wifi - what are your security settings on your router -WPA2or something different? -
@livius
Yes, We are trying to connect WiFi and our router is setup at WPA2 configuration.We tried with sample code provided in the pycom documentation.
We want fipy board to be worked as both station and access pointThank You
-
@archana-kadam
Did you fallowed both samples?
https://docs.pycom.io/chapter/tutorials/all/wlan.html
https://docs.pycom.io/chapter/firmwareapi/pycom/network/wlan.htmlbetter show the code and then we can help more -of course without passwords ;-)
-
@livius
https://docs.pycom.io/chapter/firmwareapi/pycom/network/wlan.html
we tried with this sample examples.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login