Search found 10 matches

by smssms
Tue Mar 21, 2017 2:07 pm
Forum: The WiPy
Topic: Code only runs when USB serial connected
Replies: 8
Views: 135

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
Topic: Code only runs when USB serial connected
Replies: 8
Views: 135

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
Topic: Code only runs when USB serial connected
Replies: 8
Views: 135

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
Topic: Code only runs when USB serial connected
Replies: 8
Views: 135

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
Topic: Code only runs when USB serial connected
Replies: 8
Views: 135

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: 204

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: 204

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: 204

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...
by smssms
Wed Feb 15, 2017 8:05 am
Forum: Drivers for External Components
Topic: TCS34725 (colour sensor) can't creat object.
Replies: 6
Views: 204

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

Thank you for the reply. The only reason the line numbering is out is because I added a couple of comments in my project copy for my own reference. I have adjusted the library to the best of my ability to work with pyb.I2C ( https://github.com/smssmssms/micropython-adafruit-tcs34725/commit/3abdf688b...
by smssms
Tue Feb 14, 2017 8:50 am
Forum: Drivers for External Components
Topic: TCS34725 (colour sensor) can't creat object.
Replies: 6
Views: 204

TCS34725 (colour sensor) can't creat object.

I'm using the Adafruit/tdicola TCS34725 micropython library https://github.com/adafruit/micropython-adafruit-tcs34725/blob/master/tcs34725.py and have had it working fine with my Pyboard. But now (for some unknown reason) I am totally stuck; I can import the library but when I go to create the senso...

Go to advanced search