How to code ADAfruit Clue to store sensor data in the Flash memory or RAM? - adafruit

Using ADAfruit clue and coding it via the Arduino IDE to run and print Acceleration readings using the Accel+Gyro sensors we have in the ADAfruit Clue board.
We can print the instantaneous acceleration readings on the Clue screen and also on the Serial monitor.
What if we want to store the readings of 30s in the Flash/RAM memory?
What if we want to run the program if there is an external command given and stop the program after 30 seconds of running it?
A few more questions related to storage of data are as follows:
Should we use Flash memory or RAM to store data? why?
Will (1MB or 256kB) be it be able to record and store 30 seconds data?
How to export the stored data to another device?

Related

WebRTC probing drops down transfer bit rate

I am currently using Webrtc to stream a game. It's a custom WebRTC implementation inside the game engine.
Both the client and the server easily support 100+ Mbps upload speed. Currently, i have locked the max bitrate to 80 Mbps, which is supported.
The issue happens when the webrtc probes for the connection speed, it drops down to 7-8 mbps then it slowly goes back up to 80mbps.
Which drops again when a webrtc-probing happens.
I have linked a video below of the issue.
https://drive.google.com/file/d/1coI3rrGVf4OAFnt2oeSCx0zFJznvfyQv/view?usp=sharing
What could the issue be and is there any solution to fix it?

What is a typical time for a USB write on an STM32?

I have an STM32f042 and I have loaded the example Custom HID firmware from the STM32F0x2_USB-FS-Device_Lib V1.0.0.
I then did some simple write transfers sending just one or two bytes, and watched the response using wireshark.
After doing about ten transfers it looks like time for a transfer to complete ranges between 15ms and 31ms with the average being somewhere around 25ms.
I've been told in the past that a single fast USB transaction should take around 1ms so this feels to me to be about an order of magnitude slow.
Is this a normal time for this chip? (And how would I go about figuring out what "normal" is?) Or is this abnormally slow?
Please check configuration descriptor in usbd_customhid.c file. The polling interval for each endpoint set but parameter: bInterval, the default value in examples(as I remember) set to 0x20(32ms) try to change it!

GPS coordinates not updated every time

I'm using SIM808 to get GPS coordinates. I'm fetching GPS data every 10 seconds. But I'm getting the same GPS coordinate 2-3 times. AT command (CGPSINF) does not yield a new coordinate on every call, so I get repeatedly the same coordinate.
Please help me out why I'm not getting updated GPS coordinate on every AT command call. Previously I was working on Ublox GPS receiver, same things happened there. That module also sent repeated coordinates when I was using this with a Python library on Raspberry Pi.
There will be some data stored in buffer in serial. You have to flush it before you read the data.
Suppose your serial port is defined like this:
ab= serial.Serial('/dev/ttyUSB0')
So before reading data flush the buffer.
ab.flush()
Then read the data from it.
ab.readline()

What is the maximum database size in Titanium?

What is the maximum database size? Is there a chart that shows maximum database size across different devices? Can you store a pre-populated database on an SD card and plug that into the device and read that database with titanium?
There is no limit (as far as I know besides SQL limits) on the size of a database except available storage on device, but obviously your app wont really function responsively if you have a ridiculous (a million rows) amount of data stored on the device.
The chart would just be comparing phone flash memory.
Probably, but there hasn't been a lot of success. Check here, and here and here.

To conserve iPhone power, but allow data transfer over TCP-IP?

To conserve iPhone power, but allow data transfer over TCP-IP what do I do?
I need to receive a constant stream of data all the time. But I don't want to kill the battery in 4 hours by removing the sleep feature.
thx
In one word you cannot do that, you cannot transfer constant stream of data over TCP-IP. One user closes your app, apple restricts resource access to your app. This is apple way of conserving power. You need not worry about power.
I think this old question of mine would help you - iOS Background downloads when the app is not active
You might be able to reduce power a bit by sending or asking for data in the largest chunks possible consistant with smooth operation of your particular application, as larger data bursts may allow the radios to idle for longer periods between the data transfers; and allowing the wifi and cellular radios to turn off greatly reduces power consumption.