Is it possible to store sensor's outputs on the Rapid ioT device and read it as an USB key?
Jean-Philippe Lelievre,
You will find attached to this post an example project to be imported into MCUXpresso and a binary file to be flashed into K64F.
This example takes a chunk of temperature measurements and stores the result in a text file (RAPIDIOT.TXT).
The parameters can be easily modified via some define in the code (source/app_usb.c):
/* Number of measurement to take */ #define x 100 /* Delay between measurements, (in ms)*/ #define DELAY 50
First, compile and debug the application from MCUXpresso and then terminate the debug session. When all measurements are done (display on Rapid-IoT screen), plug in the Rapid-IoT into a host PC using USB mini cable. You should see the device as a removable disk with inside the data file. Reset Rapid-IoT to start again the demo.
From there, by modifying the code you can develop your own USB application.
Regards,
Theophile
Hi,
USB mass storage example published above uses fatfs in RAM memory which is limited to 47,5kB. Is it possible to export more than 47,5kB of data?
Bonjour,
Merci, nous allons tester
--
Jean-Philippe Lelièvre mercredi, 28 novembre 2018, 02:24AM +09:00 de theophileleroy admin@community.nxp.com :
>NXP Community
>Re: Rapid ioT and USB key
>reply from Theophile Leroy in Rapid IoT - View the full discussion
To fill your need, an example where Rapid-IoT is used as a Mass Storage Device is under development. It will store data from sensors and could be read in a text file via a PC.
We will get back to you when available.
Regards,
Theophile
Thank you, looking forward seeing it.
Hi,
On a technical side it is feasible to turn the kit into a USB key. We have a micro controler inside, a 16MB memory and the right connector.
We did not anticipate such a use case and we have no code example available for this at this moment.
Also, as there is only 1 USB port which is currently used for programming the chips into the kit, if we convert it fully as a standard USB drive, you will have to figure out how you will fall back to the USB used for programming. (This would be possible by defining a combination of push buttons to select to USB port function).
This means this is quite advanced programming of the kit and I would first advise to consider other ways of extracting the data from the kit:
- As mentionned by Jay, you can store data on the cloud and download a CSV file
- You could store your data in the NTAG memomry and get them via NFC
- You could also send them over BLE or THREAD
- You can get them out via I²C or UART
- You could use a UART to USB click element : USB UART 4 click - USB-to-UART interface module | MikroElektronika .(Storing the data in the NOR memory and reading it back). This element is not supported yet in Rapid IoT Studio, but developping associated code/driver is much simpler than turning your kit into a USB drive.
-...
Eric
Thank you for your explanations
- As mentionned by Jay, you can store data on the cloud and download a CSV file : this imply that the BLE link between the device and the app is working. For us unfortunately your app doesn't see the Rapid IoT
- You could store your data in the NTAG memomry and get them via NFC : how big is the memory?
- You could also send them over BLE or THREAD : what is the transmission protocol in BLE?
- You can get them out via I²C or UART : with which connector?
- You could use a UART to USB click element : USB UART 4 click - USB-to-UART interface module | MikroElektronika .(Storing the data in the NOR memory and reading it back). This element is not supported yet in Rapid IoT Studio, but developping associated code/driver is much simpler than turning your kit into a USB drive.
Could be, but having an additional element when the Rapid IoT is already working in USB is weird.
Hi,
https://community.nxp.com/docs/DOC-334499
https://www.nxp.com/docs/en/data-sheet/NT3H2111_2211.pdf
https://www.nxp.com/downloads/en/schematics/SCH-29943.pdf
We can have a private conversation about your specific use case so we can advise on the best way to build your solutions. Using the existing USB plug to get data out is totally possible, but as mentionned would require precise understanding of how it is currently use so the kit can be reverted in its default state when needed
Hi Jean Phillipe, Sorry about the delay we have a number of folks flying back form overseas. The sensor values are automatically stored in the Cloud under Rapid IoT Studio ( there is a limit to the amount of free storage, but that's the easiest way to store data. . We';; get back to you on whether certain values can be stored on Rapid IoT itself ( I don't believe so)
Hi Jean,
Thank you for your questions. We are working on a response and will get back to you as soon as possible.