Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CuteDigi Playground
A place to explore and exchange ideas
Search… Search
Advanced search
FAQ
Register
Login
1 post • Page 1 of 1
In this tutorial, we are going to show how to run PyMite on Arduino Mega
http://www.cutedigi.com/product_info.php?products_id=4232
1. Install tools:
A: Cygwin
http://www.cygwin.com/
Remember to select GCC and python packages.
B. Install WinAVR:
http://sourceforge.net/projects/winavr/files/
C. Download PyMite 8
http://www.pythononachip.org
1 of 5 18/3/10 18:23
CuteDigi Playground • View topic - Step by Step on running... http://www.cutedigi.com/forum/viewtopic.php?f=10&t=31&st...
arduinomega.rar
ArduinoMega port
(94 KiB) Downloaded 66 times
3. Under trunk$, do
make PLATFORM=arduinomega
If it shows pmfeatures.h is missing, please check that you are using the make from WinAVR.
Correct the PATH to make sure you are using that make.
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
4. The next step is to program the generated main.hex to the Arduino mega board.
You need STK500, and install AVR studio. Choose Device type ATMEGA1280, and fuse setting
is shown as
2 of 5 18/3/10 18:23
CuteDigi Playground • View topic - Step by Step on running... http://www.cutedigi.com/forum/viewtopic.php?f=10&t=31&st...
5. Find a serial port and see what comes out from the serial port of Arduino Mega:
3 of 5 18/3/10 18:23
CuteDigi Playground • View topic - Step by Step on running... http://www.cutedigi.com/forum/viewtopic.php?f=10&t=31&st...
#
# PyMite - A flyweight Python interpreter for 8-bit and larger
microcontrollers.
# Copyright 2002 Dean Hall. All rights reserved.
# PyMite is offered through one of two licenses: commercial or open-source.
# See the LICENSE file at the root of this package for licensing details.
#
#
# This is a sample application that calls functions in the AVR module.
#
"""__NATIVE__
#include <avr/io.h>
4 of 5 18/3/10 18:23
CuteDigi Playground • View topic - Step by Step on running... http://www.cutedigi.com/forum/viewtopic.php?f=10&t=31&st...
"""
#
# Initialize the AVR's port A pin direction
#
def init():
"""__NATIVE__
/* Set port A pins as all outputs */
DDRA = 0xFF;
NATIVE_SET_TOS(PM_NONE);
return PM_RET_OK;
"""
pass
init()
import avr
avr.portA(0xaa)
jingfeng
Posts: 21
Joined: Tue Aug 18, 2009 10:25 pm
Top
Post a reply
1 post • Page 1 of 1
Return to Python-on-a-chip
Who is online
Board index
The team • Delete all board cookies • All times are UTC - 7 hours [ DST ]
5 of 5 18/3/10 18:23