Need help getting the Dot3k working


#1

Hi
I’ve recently bought a Display-o-tron 3000 for my Pi b+ running Raspbian (fresh install) and I’ve run these commands from the github website:

sudo apt-get install python-dev python-pip python-smbus
sudo pip install dot3k

and i’ve enabled spi and i2c…

…but as a complete n00b I’m having trouble working out what to do next…would anyone mind guiding me through the setup process?

Thanks in advance! :)


#2

Ahoy! Great to have, as you put it, “a complete n00b” diving in the deep end! Welcome.

The next step with dot3k would be to run one of the included examples from GitHub and verify that everything works. How familiar are you with grabbing and running code from there?

You should:

git clone https://github.com/pimoroni/dot3k

Then:

cd dot3k/python/examples/basic
sudo ./hello_world.py

If this works you should try backlight.py and some of the others.

If you’re a little confident with Python then these examples will give you a starting point for doing your own thing.


#3

hi thanks for the quick response, I did try the hello world example among the others, and I just kept getting various errors (sorry I should have saved them!)… One thing I kept being told was that I should run the code in root? not sure what that means or how to do that… I’ve literally spent all day attempting to figure this out, as well as get my pi desktop working on my ipad (but that’s another story) but before I can try any more suggestions out, I need to reformat the sd and reinstall raspbian as it decided not to remote connect and I couldn’t get to a display so had to just unplug it… :/ I’ll try it again tomorrow and get back to you with the exact issues! I’m completely new to the whole pi & python world so this might take a while…it’s all new territory! Thanks again!


#4

Spending all day trying to get something working is absolutely perfectly normal, and dare I say encouraged! I spent many a night cluelessly hacking on code until 6AM until I got confident enough to convince people I was a programmer.

Once you’ve done your fresh install of Raspbian, make sure you fire up a terminal and run these commands:

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update

And then reboot. That should make sure that you’re on the very latest and greatest, since the image you download from the website may lag a little behind.

By “run the code as root” we generally mean “run the code as the root user/superuser account”. The “root” user has godly powers of access to all the Pi hardware that normal user accounts on the Pi can’t get at.

If you’re using IDLE or IDLE3 to do your Python coding, you should start it by first launching LXTerminal ( the black screen icon on the Pi desktop ) and typing:

sudo idle

for Python 2.x, or

sudo idle3

for Python 3.x

The “sudo” command is the one that runs everything after it as root.

If you’re running a python script from the terminal, you’d do something like:

sudo python myscript.py

And boom, you’ll be running that script as root!

Good luck, and hopefully we’ll get you up and running soon!


#5

Apologies, I haven’t been able to look at it today- I’ve started back at uni after a reading week and it’s really hectic…I’ll look on Wednesday when I have a bit of time off…thanks for your help though!


#6

That’s no problem! Good luck with Uni.


#7

thanks… okay so, I think I’d missed out the sudo apt-get upgrade command last time… I’ve also been just saving the raw files onto the pi-not sure if that’s what you meant by 'git clone’
This is the latest error message I got whilst running setup.py sudo idle. I definitely have the st7036 & sn3218 installed…weren’t others having a similar issue with them? I also have no clue what the rest of that error code means… :/

Traceback (most recent call last):
File “/home/pi/Desktop/setup.py”, line 51, in
install_requires= [‘st7036’,‘sn3218’]
File “/usr/lib/python2.7/distutils/core.py”, line 140, in setup
raise SystemExit, gen_usage(dist.script_name) + “\nerror: %s” % msg
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …]
or: setup.py --help [cmd1 cmd2 …]
or: setup.py --help-commands
or: setup.py cmd --help

error: no commands supplied


#8

You have to specify a command to setup.py, in your case it would be:

sudo python setup.py install

#9

…okay I’ll try it later :)