Internet of things

I still cant get this to run. Atom freezes (run button disappears), the LOPY freezes,no error codes as described.
Atom wont even run 02 make it red.py. I am about to give up, having wasted hours and days. I need some trouble shooting help. Do you provide this? I accept this would come at a cost.

Please give us a starting point. What hardware running what software connecting to what by means of?

Very hard to answer without basic information.

Windows 10 Pro
Lopy Pycom1 Expansion Board 2 with firmware upgrade
Atom 1.37.0 x64.
Pycom MicroPython 1.18.2.r6 [v1.8.6-849-a210e85] on 2019-05-13

Running C:\Users\andrewr\Documents\iot-workshop-master\02 Make It Red.py

�ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff8028,len:8
load:0x3fff8030,len:1688
load:0x4009fa00,len:0
load:0x4009fa00,len:14592
entry 0x400a059c

Also, https://docs.pycom.io/chapter/datasheets/downloads/wipy3-pinout.pdf seems to be a blind link.

This shows your code being entered. If nothing appears to happen, then you need to start debugging the code, looking for infinite loops, resource unavailabily and such.

Several things you could do.

Cut out things and see if that progressed.

Hang a LED of any unused pins, and turn them on at different points in the code.

Try running REPL to debug.
https://docs.pycom.io/gettingstarted/programming/repl/
For info if you’re not familiar with it.

2 Likes

Andrew, You can find the pinout here:

I’ll update this on the product page.

I can run this:
import pycom
import time

pycom.heartbeat(False)

while True:
pycom.rgbled(0xFF0000) # Red
time.sleep(1)
pycom.rgbled(0x00FF00) # Green
time.sleep(1)
pycom.rgbled(0x0000FF) # Blue
time.sleep(1)

but not the 02 Make it Red.py file which is near on identical.

And the difference between the 2 files is?

More colour changes. And heaps of explanatory text in the tutorial file.

And without the extra text, all with # precursor it works!

Congratulations.

Clinton, thanks for that.
Whilst you are there, the reference to [Breadboard Circuit Pictures] needs more detail?
Are there some pictures?

Thanks, but why?

Sorry Andrew. I can’t answer that with any surety. The # in python is just a comment, and pretty much ignored by the interpreter.

Perhaps the original .py file was corrupt and editing sorted out the error.

Perhaps the hex file was corrupted somehow.

But put it down to gremlins and try not to jump up and down on the board. :grinning:

A very frustrating experience none the less. The board is still intact but only just. Now to try and move on and do something a bit more useful than making pretty colours.

Just a follow up question were did you get that link from, I had assumed that it was on the wipy product page. If you let me know I’ll see what I can do about the updates.

On note with python it can get a little odd with code copied from the internet as it does not treat all white space the same. For example a tab on one line and four spaces on another will cause and error so it is possible that there was something odd that you did not see that was deleted.

though without access to the original code it is difficult to say.

Clinton
In the tutorial, How to Build Internet-Connected Electronics Projects, under the section titled 03 I SEE THE LIGHT, about Line 13, [Breadboard Circuit Pictures] appears as a line but there are no pictures.
Is that what you mean? I cant quite see the picture from the top of the tutorial clearly enough to be sure of the wiring, so I was hoping this bracketed comment meant there were more pictures to help with wiring.

The other link was from the same tutorial, same section, line 4.

Thanks for tip about white spaces, it is much appreciated. All code I was referring to was from this tutorial.