Commit Graph

1174 Commits

Author SHA1 Message Date
Kwabena W. Agyeman
2ef24cec0f Add BLE Driver
This a python module driver for the BLE module. It puts the module into
a mode that's good for machine interfacing and handles parsing commands
for you. Additionally, it lets you get access to the low level serial
port.

Users who want to use this driver will need to read and understand the
TruConnect API for what commands they can execute. This driver simply
makes executing commands easy. The user simply needs to call the
"command()" function with the strings listed on the TruConnect API and
they will get the response from the command back as a byte object.

Once the user has executed the nessary commands to setup the BLE
connection they can then do:

ble.command("str")

To put the BLE module into streaming mode and then they can just
directly access the serial port via:

ble.uart().write(<data>)

And etc.
2016-03-20 12:58:32 -04:00
Ibrahim Abd Elkader
089a7d4a45 Merge pull request #101 from kwagyeman/master
Add copy color.
2016-03-19 20:44:44 +02:00
Kwabena W. Agyeman
97a456c837 Add copy color.
The copy color function now works. It will automatically determine the
best thresholds to use to track a particular color blob for you.
2016-03-19 13:41:48 -04:00
iabdalkader
cf71b75962 Update change log 2016-03-19 19:10:06 +02:00
iabdalkader
7d6c59f834 Update firmware binaries 2016-03-19 18:59:33 +02:00
iabdalkader
cb211024c9 Increase serial timeout after connecting. 2016-03-19 18:53:54 +02:00
iabdalkader
5069a71e10 Break after connecting.
* Add break in serial connect retry loop
2016-03-19 18:47:44 +02:00
Ibrahim Abd Elkader
825911abe6 Merge pull request #99 from kwagyeman/master
Move LCD code into module.
2016-03-19 01:33:35 +02:00
iabdalkader
44895ead25 Add LCD module 2016-03-19 01:32:05 +02:00
Kwabena W. Agyeman
94910c8ed7 Move LCD code into module. It's now ultra fast, safe and friendly. I
tested everything too and added an example script (very simple).
2016-03-17 20:01:03 -04:00
iabdalkader
e13da8b3b8 Update PyInstaller's Spec File.
* Add pinout.png.
* Update to pyinstaller-3.1.1
* Note: this only works with setuptools==19.2
2016-03-15 00:44:00 +02:00
iabdalkader
2431556a87 Update firmware images. 2016-03-15 00:21:42 +02:00
iabdalkader
819027f525 Use pin aliases in scripts. 2016-03-15 00:15:32 +02:00
iabdalkader
900b5cdba2 Add P6 pin alias. 2016-03-15 00:11:13 +02:00
iabdalkader
f85f42f7bf Up IDE tag name. 2016-03-15 00:05:56 +02:00
iabdalkader
65ddf182b1 Update pin-out image. 2016-03-15 00:03:33 +02:00
iabdalkader
9a8a5375da Add pin aliases. 2016-03-15 00:03:02 +02:00
iabdalkader
d4ea452902 Fix median code.
* Use new IM_ macros.
* Fix allocation problems.
2016-03-13 23:37:58 +02:00
iabdalkader
33d4d2a1ad Support keypoints on QVGA resolution.
* Use the moving window integral to compute keypoints.
2016-03-13 01:44:07 +02:00
iabdalkader
2f9a541cbc Abort DMA transfer after snapshot. 2016-03-11 04:17:18 +02:00
iabdalkader
ebf13197a9 Disable USB IRQ before stopping script.
* This ensures that FS IRQ will never run during a soft-reset which
causes issues when using SD card.
2016-03-11 04:14:19 +02:00
iabdalkader
31697a163b Re-init storage after soft-reset. 2016-03-11 04:13:23 +02:00
iabdalkader
0370eb54be Move SD card initialization to sdcard_init 2016-03-11 04:12:06 +02:00
iabdalkader
6136bd04e1 Try to connect a few times before giving up.
* Fixes the connect button hang issue.
2016-03-11 03:37:35 +02:00
iabdalkader
6ee32b89e2 Update Eagle files.
* Rename VIN to VCC on backside silkscreen
2016-03-11 02:29:14 +02:00
Ibrahim Abd Elkader
d612afccef Merge pull request #98 from kwagyeman/master
Add file read speed.
2016-03-10 00:32:32 +02:00
Kwabena W. Agyeman
302deb0662 Add file read speed.
File reading is runing ultra fast now. We're getting that SD card speed
the STM32 promised now. The file buffer commands have been updated to
alloc as much available memory to read as much of a file in as possible
now to speed up things. This works really great.

Note however, while the file buffer is active you have to use the file
buffer versions of tell and size. Spent a few hours on tracking down an
error related to not using the buffered versions.
2016-03-08 23:38:13 -05:00
Ibrahim Abd Elkader
cad38847e9 Merge pull request #97 from kwagyeman/master
Updated code to use fb_alloc.
2016-03-07 22:56:00 +02:00
Kwabena W. Agyeman
14dbcbd73c Updated code to use fb_alloc.
All file write functions now use fb_alloc to go much faster. Writes are
re-directed to the extra frame buffer RAM and are grouped until they can
be written in a massive multi-block write to the SD card. We get the
best SD card write speed by doing things this way.

Ideally we'd want to buffer the whole file... but, this is about as good
as we're going to get for now.

Going to fix reading functions to use the same buffer next.
2016-03-07 00:09:04 -05:00
iabdalkader
2ab0688cbd Fix comment.
* Framebuffer is not actually global.
2016-03-06 19:03:30 +02:00
iabdalkader
6cb7288def Add NORETURN to __fatal_error 2016-03-06 19:03:00 +02:00
iabdalkader
a1c9e8a6f6 Set fb values directly when request frame size. 2016-03-06 19:02:12 +02:00
iabdalkader
d1e782df3d Remove default sensor config.
* Not really needed.
2016-03-06 19:01:10 +02:00
iabdalkader
e3cc4cd83f Add delays after changing pixformat/framesize. 2016-03-06 19:00:41 +02:00
iabdalkader
3e6e84cbb4 Skip the first frame after changing size or format. 2016-03-06 18:38:25 +02:00
Ibrahim Abd Elkader
547aa0528e Merge pull request #96 from kwagyeman/master
Update Gif to use fb_alloc_all.
2016-03-06 17:24:50 +02:00
Kwabena W. Agyeman
66248c444b Update Gif to use fb_alloc_all.
And tested it along with mjpeg to make sure all this stuff is good. I
also see the issue with QQVGA now. That just appeared.
2016-03-05 22:29:21 -05:00
iabdalkader
b78e325c60 Up MP branch. 2016-03-06 03:14:42 +02:00
Ibrahim Abd Elkader
d18d898203 Merge pull request #95 from kwagyeman/master
Add a new mjpeg module for Mjpeg support.
2016-03-06 03:14:59 +02:00
Kwabena W. Agyeman
5316b26d83 Added a new mjpeg module for Mjpeg support.
The built-in mjpeg module allows you to record videos seamlessly. It
will automatically compress the frame buffer using the extra space in the
main ram. So... you don't have to pass it jpeg images. Gets 7 FPS at
320x240 while connected to the computer too (it has to compress the
frame twice in this situation).

Anyway, the module work like Gif.
2016-03-05 20:03:48 -05:00
iabdalkader
acc35704d8 Disable IRQs when doing a soft-reset. 2016-03-06 02:51:34 +02:00
iabdalkader
2ab317063d Re-exec REPL if there's no script to execute. 2016-03-06 02:39:58 +02:00
iabdalkader
fe506fa0fb Use sizeof(tx_buf_len) instead of length.
* Length should always be 4 but it's safer this way.
2016-03-06 02:37:36 +02:00
iabdalkader
c12473d8b7 Execute a script only if there's no script running. 2016-03-06 02:36:45 +02:00
iabdalkader
28047269ac Add DSB after setting USBDBG IRQ. 2016-03-06 02:36:10 +02:00
iabdalkader
87f9c92f1b Skip the first JPEG/RAW frame.
* Set BPP to zero in set_pixformat to skip compressing/sending the first frame.
2016-03-06 02:32:11 +02:00
iabdalkader
911f9827ea Enable DMA IRQ just before the snapshot. 2016-03-06 02:28:05 +02:00
Ibrahim Abd Elkader
26140158ab Merge pull request #94 from kwagyeman/master
Add fb_alloc_all.
2016-03-05 18:29:44 +02:00
Kwabena W. Agyeman
98800c31c7 Add fb_alloc_all.
Now you can just grab all the free ram in the frame buffer in one go.
This fixes problems figuring out how many lines to alloc. Will update line
op code with this new info later.
2016-03-05 11:27:37 -05:00
iabdalkader
06b1cfca3b Use IRQ priorities defined in irqs.h 2016-03-05 18:25:51 +02:00