Search found 12 matches

by smssms
Mon May 29, 2017 8:41 pm
Forum: General Discussion and Questions
Topic: How to advance and imporve my MicroPython fu?
Replies: 1
Views: 367

How to advance and imporve my MicroPython fu?

Quite a general question.... I am vaguely competent with Micropython, fumbling through with a lot of trawling forums, cut&paste code snippets and googling to get the job done in a clunky/sledgehammer fashion usually. There seem to be a lot of online courses, books, MOOC, tutorials, etc on various as...
by smssms
Mon Apr 03, 2017 8:44 pm
Forum: General Discussion and Questions
Topic: Difference between code in REPL and in main.py
Replies: 1
Views: 276

Difference between code in REPL and in main.py

I am using a WiPy to read a TCS34725 colour sensor. When I run the code as snippets from the REPL, the readings are rock solid. But when the same code is running within main.py the sensor readings are drifting (significantly and predictably). It is a long shot, but is there any fundamental reason th...
by smssms
Tue Mar 21, 2017 2:07 pm
Forum: The WiPy and CC3200 boards
Topic: Code only runs when USB serial connected
Replies: 8
Views: 617

Re: Code only runs when USB serial connected

SOLVED

Despite the stepper motor working fine upto the point of failure, it looks like it was a power supply issue.

When I drive the stepper motor from a separate supply it all seems to work ok with or without USB connected.
by smssms
Tue Mar 21, 2017 12:12 pm
Forum: The WiPy and CC3200 boards
Topic: Code only runs when USB serial connected
Replies: 8
Views: 617

Re: Code only runs when USB serial connected

It is the latest WiPy and on an Expansion Board.

Tried removing the jumpers as described - same problem :(
by smssms
Tue Mar 21, 2017 11:31 am
Forum: The WiPy and CC3200 boards
Topic: Code only runs when USB serial connected
Replies: 8
Views: 617

Re: Code only runs when USB serial connected

XP JCJ1012S05 1.5A 5V output DC/DC converter into Vin/Gnd Plus 10uF capacitor for smoothing as it also has to run a stepper motor. The max. draw is only 800mA, so well within the supply's limits. The stepper motor is running in the first 1/3 of main.py too with no problems. But without USB, it just ...
by smssms
Tue Mar 21, 2017 10:46 am
Forum: The WiPy and CC3200 boards
Topic: Code only runs when USB serial connected
Replies: 8
Views: 617

Re: Code only runs when USB serial connected

It will not run with a Telnet connection either (and there are no error messages when it fails on Telnet). I've had a stab at try: except: to write exceptions to the SD card, but nothing seems to go there. I'm starting to thing it is some sort of power supply issue i.e. it is only working with USB p...
by smssms
Mon Mar 20, 2017 8:14 pm
Forum: The WiPy and CC3200 boards
Topic: Code only runs when USB serial connected
Replies: 8
Views: 617

Code only runs when USB serial connected

Has anyone else experienced this: I have some code which will run fine in the REPL as snippets, it will run fine as main.py (with USB serial connected), but when I try to run it without the USB plugged in, it just stops part way through. As I don't have the USB connected I can't see error messages o...
by smssms
Mon Mar 20, 2017 8:09 pm
Forum: Drivers for External Components
Topic: TCS34725 (colour sensor) can't creat object.
Replies: 6
Views: 655

Re: TCS34725 (colour sensor) can't creat object.

Bit of an update:

When I moved the project onto a WiPy, I had to change "sensor = tcs34725.TCS34725(i2c)" to . "sensor = TCS34725.TCS34725(i2c)" for it to work.
by smssms
Wed Feb 15, 2017 11:29 am
Forum: Drivers for External Components
Topic: TCS34725 (colour sensor) can't creat object.
Replies: 6
Views: 655

Re: TCS34725 (colour sensor) can't creat object.

Partially solved :D

The change that broke it - moving from Pyboard V1.0 to V1.1

No idea why, but I can get the TCS34725 sensor/library to work on a V1.0 board, but it does not seem to work (for me) on a V1.1.
by smssms
Wed Feb 15, 2017 10:02 am
Forum: Drivers for External Components
Topic: TCS34725 (colour sensor) can't creat object.
Replies: 6
Views: 655

Re: TCS34725 (colour sensor) can't creat object.

I've been trying with your original code (using machine.I2C) and my adjusted code (with pyb.I2C): https://github.com/smssmssms/micropython-adafruit-tcs34725/commit/3abdf688b287fd7825a3f7d9fd3020f29d78c879 Both can 'see' the sensor with i2c.scan(), sensor.active(), sensor.gain(), etc. But both fail t...