Search found 176 matches

by JimTal001
Mon Apr 24, 2017 9:41 pm
Forum: MicroPython pyboard
Topic: reducing memory
Replies: 12
Views: 3072

Re: reducing memory

Thanks everyone for your assistance here. Currently, I'm using list. This is the way I initialize the list: data = [[0]*lineCnt for x in range(depthCnt)] where lineCnt is typically 288 (5 minute readings for 24 hours) and depthCnt is 7 The values are Temperature in deg C. One point precision is suff...
by JimTal001
Sat Apr 22, 2017 11:44 pm
Forum: MicroPython pyboard
Topic: reducing memory
Replies: 12
Views: 3072

reducing memory

I am currently at/near the limit of the pyboard memory when processing data and now I've been tasked with more than doubling the volume of data to process on the pyboard. Currently I read in a file which contains around 2016 floating point values and store the data in a floating point array of size ...
by JimTal001
Thu May 26, 2016 5:40 pm
Forum: MicroPython pyboard
Topic: boot from SD but run from flash
Replies: 1
Views: 1091

boot from SD but run from flash

Currently, my data logger boots from SD card, runs a python script on the SD card and logs to SD card. I would like to change this to where the python script resides on internal flash but still logs on the SD card. Assuming this is possible. Is this how to point to an internal flash python script fr...
by JimTal001
Wed May 25, 2016 9:24 pm
Forum: General Discussion and Questions
Topic: Additional A/D Channels Needed for Pyboard
Replies: 5
Views: 2303

Re: Additional A/D Channels Needed for Pyboard

I found this board at sparkfun: https://www.sparkfun.com/products/9056
More info here: http://bildr.org/2011/02/cd74hc4067-arduino/

Two of these will give me 32 Analog sensor using a total of 8 GPIO pins. Cost is low ($5 per).
by JimTal001
Wed May 25, 2016 2:15 pm
Forum: General Discussion and Questions
Topic: Additional A/D Channels Needed for Pyboard
Replies: 5
Views: 2303

Re: Additional A/D Channels Needed for Pyboard

It looks like the MCP3008 has a chip select pin. So you should be able to connect DOUT/DIN/CLK in parallel from multiple chips and just activate the CS pin for the chip you want to talk to. Please correct me if I'm wrong, but as per my understanding it is not possible to use a standard GPIO pin to ...
by JimTal001
Tue May 24, 2016 8:39 pm
Forum: General Discussion and Questions
Topic: Additional A/D Channels Needed for Pyboard
Replies: 5
Views: 2303

Additional A/D Channels Needed for Pyboard

I've been using the pyboard to collect and log data for 10 analog sensor, but now I need to increase the sensor count to around 30. Yes, that is a lot. Assuming all analog pin on the pyboard are occupied, what low cost alternatives exist for adding 20 analog input? The MPC3008 chip will work if I ca...
by JimTal001
Mon May 16, 2016 6:47 pm
Forum: General Discussion and Questions
Topic: Pyboard and linear ccd sensor(TSL 1410R)
Replies: 17
Views: 6980

Re: Pyboard and linear ccd sensor(TSL 1410R)

As previously mentioned, running the code above which performs a single scan appears to work reasonably well, but if I try to perform multiple scan, like: for i in range(10): pyb.delay(1000) # wait 1 sec before collection the next output data = read() logData() The returned data is not representativ...
by JimTal001
Sat May 14, 2016 3:28 pm
Forum: General Discussion and Questions
Topic: Pyboard and linear ccd sensor(TSL 1410R)
Replies: 17
Views: 6980

Re: Pyboard and linear ccd sensor(TSL 1410R)

Actually I am not providing any supplemental light, just natural light from a window. Even in a fairly darkened room (blinds closed) the sensor is reporting max voltage where there is no mask over the sensors.
by JimTal001
Fri May 13, 2016 11:58 pm
Forum: General Discussion and Questions
Topic: Pyboard and linear ccd sensor(TSL 1410R)
Replies: 17
Views: 6980

Re: Pyboard and linear ccd sensor(TSL 1410R)

Has anyone continued work with this sensor? Or willing to? I've been working with the sensor for the past few days and have not quite figured it out. I can get representative data when running the code below but it is not very repeatable. I am masking a small area close to the sensor to collect this...
by JimTal001
Thu May 12, 2016 12:14 am
Forum: General Discussion and Questions
Topic: Pyboard and linear ccd sensor(TSL 1410R)
Replies: 17
Views: 6980

Re: Pyboard and linear ccd sensor(TSL 1410R)

I've tried the suggested code, as listed below, but I get an error on line 7 : a = array['i', 1281] The error message is: TypeError: 'module' object is not subscriptable import array from pyb import Pin, ADC pin_si = Pin('X1', Pin.OUT_PP) pin_clk = Pin('X2', Pin.OUT_PP) pin_ao = ADC(Pin('X3')) a = a...