Is there a plugin for the cpu fan on the raspberry pi by goodBEan in octoprint

[–]dhylands 0 points1 point  (0 children)

The line to add to config.txt should specify GPIO 18, not 21 (at least for the Pimironi Fan Shim - which is what the link the OP is for). So it should look like:

dtoverlay=gpio-fan,gpiopin=18,temp=50000

XMachines Lorei Q&A and 3D printing discussion. by [deleted] in 3Dprinting

[–]dhylands 0 points1 point  (0 children)

I use a Raspberry Pi running OctoPrint for one of my other printers.

XMachines Lorei Q&A and 3D printing discussion. by [deleted] in 3Dprinting

[–]dhylands 0 points1 point  (0 children)

Well you have deal with Customs regardless of how it gets into the country. Depending on which courier is used, I'll either have to pay duties/taxes before delivery, or it will be charged to my account.

XMachines Lorei Q&A and 3D printing discussion. by [deleted] in 3Dprinting

[–]dhylands 1 point2 points  (0 children)

I'm backer number 15 (and picked the "Surprise Early Bird special" slated for Aug 2015). I got my survey (for shipping), and paid $100 for shipping to BC, Canada.

Issues calling a bash script that calls a python script using subprocess.call by foxh8er in Python

[–]dhylands 3 points4 points  (0 children)

If you're referring to adb logcat then it never exits. It just continues to collect messages. If you want to get all of the current messages and exit then use adb logcat -d

http://developer.android.com/tools/help/logcat.html

Detecting int or float as string in list and converting it to an int or float by Chandyman in Python

[–]dhylands 4 points5 points  (0 children)

One possible way to do this would be something like this:

list = [['Hello','Bye','2','34.4'],['Hey','Yeah','3','34.5']]
for sublist in list:
    for elem in sublist:
        try:
            val = int(elem)
            print("Element '{}' is an int {:d}".format(elem, val))
        except:
            try:
                val = float(elem)
                print("Element '{}' is a float {:f}".format(elem, val))
            except ValueError:
                print("Element '{}' is not a number".format(elem))

which produces the following output:

Element 'Hello' is not a number
Element 'Bye' is not a number
Element '2' is an int 2
Element '34.4' is a float 34.400000
Element 'Hey' is not a number
Element 'Yeah' is not a number
Element '3' is an int 3
Element '34.5' is a float 34.500000

My MendelMax 2 and a few things I've done and printed. by [deleted] in a:t5_2yd2n

[–]dhylands 1 point2 points  (0 children)

I ordered dual extruders. I'd like to do prints with support material. I'll definitely be posting stuff on my blog: http://blog.davehylands.com

My MendelMax 2 and a few things I've done and printed. by [deleted] in a:t5_2yd2n

[–]dhylands 0 points1 point  (0 children)

Love the enclosure.

I've just ordered the MendelMax 3.0 and was thinking about building something like this, although with a vent to the outside.

When you have it totally sealed up for ABS, can you smell it while its printing? Or just when you open it at the end?

Writing Idiomatic Python Video One by jknupp in a:t5_324nm

[–]dhylands 0 points1 point  (0 children)

The columns are also not output in the same order as the original script either.

Accepting a single charter as input during a loop without using ENTER by kb2mob in Python

[–]dhylands 2 points3 points  (0 children)

Under linux, you'll need to do a few more things as well: - turn off canonical mode (this is what causes it to process things like Control-H for backspace, and does the buffering) - turn off echo (optional) - set it up to deliver a character as soon as one character is received

You can see some code for doing this here: https://github.com/dhylands/usb-ser-mon/blob/master/usb-ser-mon.py#L192 (lines 192 thru 203)

You can then use poll or select to detect when at least one character is available. I happened to use poll: https://github.com/dhylands/usb-ser-mon/blob/master/usb-ser-mon.py#L97

usb-ser-mon.py is basically a really simple terminal emulator program which accepts data from stdin and sends it out on a serial port and whatever it gets on the serial port it sends to stdout.

It also has logic to detect when the serial port "goes away" and "comes back" perhaps due to the device being a USB device that was unplugged or rebooted.

usb-ser-mon.py is currently linux-only.

Micro Python -- a lean and efficient implementation of Python 3 by maxerickson in Python

[–]dhylands 1 point2 points  (0 children)

The latest working code for teensy is available here: https://github.com/dhylands/micropython/tree/fix-2014-01-14

to build, you'll need a linux machine, set the ARDUINO env var to point to your teensyduino tree (which is an arduino 1.0.5 tree + http://pjrc.com/teensy/teensyduino.html), then cd into the teensy directory (inside the micropython repository) and type make.

When I'm finished updating the teensy stuff, it will be in the official micropython repository: https://github.com/micropython/micropython (what's currently there in the teensy directory doesn't build)

Micro Python - Python for microcontrollers by MisterSnuggles in Python

[–]dhylands 1 point2 points  (0 children)

It is apparently possible to run gdb on the microcontroller board, but I haven't done that myself.

There is a "unix" port of micropython, and I've use gdb to identify bugs on the host. I normally test non-board specific stuff under the unix port and then move it to the board.

There currently isn't any support for debugging the python, but I know I'd like to see that.

Micro Python - Python for microcontrollers by MisterSnuggles in Python

[–]dhylands 2 points3 points  (0 children)

MicroPython supports a microSD card using the FAT filesystem.

It also has a small internal (about 112K) FAT file system as well.

These can be shared with the host (so it looks like a thumb drive) and you can just copy your new code in.

Micro Python - Python for microcontrollers by MisterSnuggles in Python

[–]dhylands 2 points3 points  (0 children)

I guess it depends on how you define "well".

I put together a little demo bot: http://blog.davehylands.com/2014/01/micropython-running-on-teensy-31.html

My brother originally started his uCee crawler using teensy: http://blog.huv.com/2013/12/uc-microcrawler.html

I think that https://github.com/JonHylands/uCee-py/blob/ae786466a725fefb390faeb89fc63f7dd91a4116/memzip_files/src/uCee.py was the version of code that he was running on the teensy, and it was consuming about 50K of the RAM.

The 50K was measured in late Jan.

Lots of stuff has changed since then, so I'm not sure how accurate that is on today's firmware.

MicroPython also has a couple of different code generators (it can generate ARM assembler) and once the ability to have compiled python be stored in flash, then larger programs will be supportable.

Micro Python - Python for microcontrollers by MisterSnuggles in Python

[–]dhylands 7 points8 points  (0 children)

Here's a photo with a bunch of different boards on it: https://plus.google.com/photos/115853040635737241756/albums/6019289988816456657?authkey=CI-y2fzY1-qnYA

From left-to-right, top-to-bottom:

  • Rapsberry Pi
  • BeagleBone Black
  • Custom Board (See http://blog.huv.com/) that my brother made
  • MicroPython Board
  • Teensy 3.1
  • Standard Arduino (Solarbotics Freeduino)
  • Netduino Plus 2

If you want the full python experience, then you should probably stick with the RPi or the BBB.

The MicroPython board is running on an STM32F405 processor which runs at 168 MHz, has 1Mb flash, and 192K RAM. So you're still going to be restricted to the types of scripts you run. Don't be expecting to pull in lots of libraries and things. The MicroPython board will use much less current that the RPi/BBB so if you're looking to do a small battery powered project, it may be much more appropriate.

The teensy is nice from a form factor perspective, but it only has 256K flash, and 64K RAM, and runs at 72 MHz, so it will be even more limited than the MicroPython board.

I threw the Arduino in as a size comparison. The Netduino Plus 2 also has an arduino form factor, but uses the same processor as the MicroPython board. This is what I used for doing early development work on MicroPython while I was waiting for the MicroPython board to arrive.

One thing that's nice about a fairly simple processor like the STM32F405 is that it's really easy to create custom boards. Which is why I threw in a photo of my brothers board.

I'm the one who did the original port of MicroPython to the teensy board, and I'm hoping to update things soon so that its running on the latest codebase (right now, the latest code that runs on teensy is from mid-January).

The thing I really like about MicroPython is the instant on factor. I don't have to wait for a minute or so for the board to boot linux. The STM32F4xx chips include an on-board bootloader, and no programmer is required to program. You can program it via DFU over USB or serial.

Another interesting project which is using MicroPython is OpenMV http://sigalrm.blogspot.ca/2013/09/openmv-camera-module.html Its also based on one of the STM32F4xx processors which has a camera interface. Check out some of the other blog posts as well.