Commit Graph

1343 Commits

Author SHA1 Message Date
Kwabena W. Agyeman
a6c2efcebe Renamed Display to Draw
And fixed type in blend. Per Ibrahim's suggestion.
2016-03-26 10:26:19 -04:00
iabdalkader
5411f9e8e7 Update MP branch. 2016-03-26 15:15:07 +02:00
Ibrahim Abd Elkader
71dd633956 Merge pull request #106 from kwagyeman/master
Add Midpoint filter.
2016-03-26 15:15:18 +02:00
Kwabena W. Agyeman
978b4c12df Add Midpoint filter.
Has a bias value that allows you to control if its really a midpoint,
min, max filter, or something inbetween. Run at 160x120 or lower. 320x240
is slow (seems to be the case for all convoltions at that res).
2016-03-25 21:26:20 -04:00
iabdalkader
b2e77e9dce Add wifi scan and connect examples. 2016-03-26 01:55:16 +02:00
iabdalkader
b92f146323 Add initial WINC1500 WiFi module driver.
* Note: partial implemented, based on CC3000 module (only scan, connect, ifconfig work)
2016-03-26 01:52:29 +02:00
iabdalkader
f447455580 Disable WINC's debugging info. 2016-03-26 00:15:28 +02:00
iabdalkader
ce949333f2 Rename WINC1500 Sockets.
* Rename functions in WINC's sockets implementation to avoid
conflicts with other sockets implementations.
2016-03-26 00:14:01 +02:00
iabdalkader
9dd3dce5af Update MP branch 2016-03-26 00:11:52 +02:00
Ibrahim Abd Elkader
bbd10ff80b Merge pull request #105 from kwagyeman/master
Add AWB/HMirror/VFlip
2016-03-26 00:12:09 +02:00
Kwabena W. Agyeman
2fa8227c7b Add AWB/HMirror/VFlip
Added setters for these camera settings. AWB is necessary for color
tracking to work correctly. AGC still runs, which causes lighting
shifts. It may need to be disabled too. Not sure... if I want to do that
or not however, because without it lightning won't get normalized to
remain at a certain level. So, turning AGC off may cause issues in other
ways.
2016-03-25 16:36:10 -04:00
iabdalkader
7109748146 Update FIR Python examples. 2016-03-25 14:03:56 +02:00
Ibrahim Abd Elkader
8d1cd9d8c4 Merge pull request #104 from kwagyeman/master
Improve IR code.
2016-03-25 13:52:27 +02:00
Kwabena W. Agyeman
a74dd50eaf Improved IR code.
Return min and max from read_ir now. Also, made drawing functions take
IR values.

Example scripts have been updated to work with the new module code.
2016-03-24 19:52:00 -04:00
iabdalkader
dfad6e4c0a Update MP branch. 2016-03-25 00:37:27 +02:00
Ibrahim Abd Elkader
3b293addff Merge pull request #103 from kwagyeman/master
Fix MLX Code
2016-03-25 00:36:26 +02:00
Kwabena W. Agyeman
88907c438c Redid MLX Code
First, a few things:

The MLX 16x4 sensor has just too low of a resolution for mass appeal for
the price. The product is not going to sell very well. We need to look
into supporting sensors with a better res. Like the FLIR 1. The MLX
module was renamed to the "flir" module with this idea in mind.

The flir code now takes care of doing scaling and blending itself. I did
this to get rid of the user having to scale the image themselves and
blend themselves. Its too easy to run out of memory given our current
ultra small heap. In general, anything that requires multiple images in
RAM has got to go. When we do another OpenMV Cam with external RAM in
the MB range then maybe such functions will be safe. But, right now they
are definately not.

Anyway, moving on, I fixed a few bugs with the MLX math code. But, for
the most part was correct. I also added reconmended polling code for
brownouts as required by the datasheet.

Last, I designed this code like the LCD code to support a type value
when inited. This will allow the system to user a different sensor in the
future without any API changes to the user.

I will add test scripts for this next. Basic usage follows:

import flir
flir.init()
flir.display_ir(sensor.snapshot())

And that's it. Super easy. If the user wants the raw temp values they
can use flir.read_ir() to get the ta and to values. The display function
has a hidden alpha and scale argument for controling blending and the
min/max scaling.

The previous way we worked out scaling kinda sucked... it was a good
shot, but, controllable min and maxes that autoscale by default just
work better. If the user knows the temp range then they can just set the
min and max.'

Anyway, longest commit ever done.
2016-03-24 18:04:05 -04:00
iabdalkader
9320338b7e Add MLX IR table generator. 2016-03-24 17:36:51 +02:00
Ibrahim Abd Elkader
e5631d2290 Merge pull request #102 from kwagyeman/master
Add BLE Driver
2016-03-20 20:04:35 +02:00
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