Retired. Just having fun now.
I'm running an Espruino Board connected to ESP8266 via serial port.
Working on a program derived from the SD card file server example.
When you request a file from the displayed list, it looks at the file extension and modifies the MIME header field.
This causes files with the extension .HTML to load the Web page.
Files with the extension .js allow an .HTML file to include scripts.
Files with the extension .csv cause Excel to load the file into a spreadsheet, which can be saved on your hard drive.
I'm having problems with another part that accepts POSTs from a client.
Most recent activity
April 1 my PC power supply emitted the magic smoke. I'm on a different one now and hoping that the a new PC power supply will fix the old one and lots of files will still be there. If not it's going to take a while to get most everything restored.
Then I will be able to try your fix.
Using two way communication.
A sends a 16 byte random number to B
B receives random number and uses secret key and the AES block encryption to encrypt the random number. B sends the encrypted results to A.
A uses original random number and secret key to calculate the encrypted value to compare with the message from B.
Attached is a start on the translation of the Adafruit C code.
Since I don't have the chip it is untested.
It should give you an idea of what is involved.
Try this as the datasheet mentions that setup has to come before enable
Here are some things to try.
Register 0x28—THRESH_FF (Read/Write)
The THRESH_FF register is eight bits and holds the threshold
value, in unsigned format, for free-fall detection. The acceleration on
all axes is compared with the value in THRESH_FF to determine if
a free-fall event occurred. The scale factor is 62.5 mg/LSB. Note
that a value of 0 mg may result in undesirable behavior if the freefall
interrupt is enabled. Values between 300 mg and 600 mg
(0x05 to 0x09) are recommended.
Register 0x29—TIME_FF (Read/Write)
The TIME_FF register is eight bits and stores an unsigned time
value representing the minimum time that the value of all axes
must be less than THRESH_FF to generate a free-fall interrupt.
The scale factor is 5 ms/LSB. A value of 0 may result in undesirable
behavior if the free-fall interrupt is enabled. Values between 100 ms
and 350 ms (0x14 to 0x46) are recommended.
- The interrupt polarity could be flipped.
Register 0x31 bit D5
A value of 0 in the INT_INVERT bit sets the interrupts to active
high, and a value of 1 sets the interrupts to active low.
Now you have me a bit worried. The oriental specifications for this device are sketchy at best.
It seems to contain 3 switches, 3 resistors and have 8 pins.
Connecting both ground and 3.3V from the Pico to this device without a proper diagram runs the risk of shorting 3.3 to ground and popping the fuse on the Pico, A Bad thing :(
If you have an ohmmeter that would provide a way to probe the device safely and figure out how it is wired. Short of that connect ground only and not the 3.3V. use the pin setup with pull up. The code that reads a Pico pin to light the LED can then be used as a test probe to puzzle out a proper wiring sequence.