Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piliteweather.py #9

Open
mamvcivm opened this issue Dec 28, 2017 · 15 comments
Open

Piliteweather.py #9

mamvcivm opened this issue Dec 28, 2017 · 15 comments

Comments

@mamvcivm
Copy link

Hi, I bought a Pi-Lite today and installed Arrow, however, on running PiLiteWeather I get the following error:-
Traceback (most recent call last):
File "/home/pi/git/PiLite/Python_Examples/PiLiteWorldTime.py", line 2, in
import arrow
File "/usr/local/lib/python2.7/dist-packages/arrow/init.py", line 3, in
from .arrow import Arrow
File "/usr/local/lib/python2.7/dist-packages/arrow/arrow.py", line 19, in
from arrow import util, locales, parser, formatter
File "/usr/local/lib/python2.7/dist-packages/arrow/parser.py", line 12, in
from backports.functools_lru_cache import lru_cache # pragma: no cover
ImportError: No module named backports.functools_lru_cache

Could someone please give me a clue as to what's happened here?

Thanks

@mamvcivm
Copy link
Author

Further to this - I tried programming the Arduino chip last night from the Pi via GPIO, I tried various example scripts from the LoLShield example folder and I got a message from the IDE that it was uploaded but nothing displayed on the Pi Lite...

Thanks,

@toldcodger
Copy link

I’m afraid I can’t help you but I’m having issues with this too. I can’t get the sketch to upload.
My serial port is coming up as /dev/ttyS0 but I get this error no matter what board I select:

avrdude stk500_recv() programmer is not responding

Can you tell me what board setting you selected in the IDE please ?

@mamvcivm
Copy link
Author

Hi, I'm currently trying to programme the Pi-Lite using a USB to UART serial console cable connected to the FTDI pins and I get the same error message as you I tried various boards but all with the same result

Thanks

@toldcodger
Copy link

Sorry to hear you’re still having troubles. If you have a USB to FTDI connection, have you tried it in a Mac or Windows machine with the Arduino IDE installed ? I can’t promise it would work of course.
In the original Ciseco document it says to download the Raspbian Arduino IDE and wrappers. I wonder if we haven’t got the wrappers or not got the correct ones ?

@toldcodger
Copy link

I think I’ve found the problem. The gpio pins don’t have a connection to the DTR pin. I found this for another board:
https://spellfoundry.com/sleepy-pi/setting-arduino-ide-raspbian/
There are 6 FDTI Connections. The Pi-Lite gpio pins only connect to ground, power, transmit and receive.
I’ve done a bit of checking and the CTS pin is probably not needed. The DTR pin resets the Arduino and the reseting stops the averdude error.
Unfortunately I don’t know what can be done.

@toldcodger
Copy link

Thanks for those links dpslwk. I’ve seen the first one several times but that second one looks promising.
It’s almost the same method as the Spell Factory one I posted. I didn’t try that one though as it was for a different product.
I’ll try this as soon as I can. Life is going to get in the way for the next could of days though :(

@mamvcivm
Copy link
Author

Hi dpslwk, I've run through the two links above but I don't think I've made any progress. When trying to upload via the GPIO pins I get the following error:-
avrdude-original: AVR device not responding
avrdude-original: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

If I try to upload by connecting the UART-USB cable to the FTDI connector, I get:-
rdude-original: stk500_recv(): programmer is not responding
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe

@toldcodger
Copy link

Im calling it 75% successful 😂
I’m using an original Pi Zero, i.e. no WiFi or Bluetooth. I did a fresh build using Jessie and followed the instructions on both links. With the exception of the Basic_Test & PILITE sketchs mine more or less works. The other sketch’s load and run but there is always this error in the bottom window:

Done with autoreset
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe

There seems to be an error in the coding on the Basic_Test sketch. I’ll have to look into that.
The PILITE sketch starts but stops doing anything at the PILite logo.
This is what I’ve tried so far.
The Arduino IDE selects serial port /dev/ttyS0 automatically. I selected the Deuamilanova w/ ATmega328 to begin with but that seemed a bit hit and miss, mainly miss 😂 The Arduino Nano w/ATmega328 was the same.
I’m currently using the Arduino Mini w/ATmega328 and that seems to be OK with everything but PILITE & Basic_Test

Thanks for the information. I’ll let you know if I get any improvements

@toldcodger
Copy link

Fixed the Basic_Test sketch.
Line 49 reads:
uint16_t BitMap [][9] PROGMEM = {
I changed it to:
PROGMEM Const uint16_t BitMap [][9] = {

I’d love to claim it was my exceptional programming abilities, but I have to be honest.

I bought the PiLite just before Christmas because a certain British high street Electronics & Hobby store were selling it off as a stock clearance. A few weeks later in the same store they had the Arduino version so I bought that too.

I just compared the sketch’s 😂

Not a clue with the PILITE sketch though

@mamvcivm
Copy link
Author

Thanks for persevering with this - I'm struggling with a small esp8266 project at the moment, but I'll go back to the PiLite when I get a moment...

@toldcodger
Copy link

I’ve now tried all the other ATmega328 options and the only one I can get to work consistently is the Arduino Mini w/ ATmega328

@toldcodger
Copy link

No worries. I’m glad I got mine working. Hopefully you’ll get yours sorted. Maybe the fresh install helped. Things like this drive me mental 😂

I think the shop involved should have said that the supplier has gone belly up though.

I doubt I would have got any further if it hadn’t been for those links from dpslwk, thanks again Sir.

@mamvcivm
Copy link
Author

Hi, I did a fresh install of Jessie on a Pi Zero, I then followed the instructions at http://web.archive.org/web/20160617202251/http://openmicros.org/index.php/articles/94-ciseco-product-documentation/raspberry-pi/280-b040-pi-lite-beginners-guide#Programming%20the%20Pi-Lite

and

http://web.archive.org/web/20160604014148/http://openmicros.org:80/index.php/articles/94-ciseco-product-documentation/raspberry-pi/288-programming-an-arduino-from-your-raspberry-pi-with-ciseco-hardware

I now find that Arduino defaults to Serial port COM1 and the Tools menu for Serial Port is greyed out - I'm not sure why this is but I can confirm that the serial port is working when I call it using Minicom - albeit I had to add enable_uart=1 to the boot/config.txt

Also, after correcting the Basic_test file, compiling it yields:-

Basic_Test.pde:49:9: error: ‘Const’ does not name a type
In file included from Basic_Test.pde:31:0:
Basic_Test.pde: In function ‘void DisplayBitMap()’:
Basic_Test.pde:294:35: error: ‘BitMap’ was not declared in this scope

I cleared this error by changing line 49 to uint16_t const(BitMap) [][9] PROGMEM = {

Cheers,

Andrew

@toldcodger
Copy link

Great news Andrew.
The serial port thing is a bit weird !!
Do you get the multiple the “Autoreset: Broken Pipe” errors ?
I tried setting up the PiLite on an original Pi with a Wheezy OS. As far as I am aware, this is what the PiLite was designed to work on. It worked using Minicom until I set up the Arduino IDE. Now neither the Minicom or IDE work. I’m back to the original avrdude error with the IDE and the Minicom just doesn’t do anything.
One step forward two steps back 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants