Difference between revisions of "CBA Hello World síðan"

From Fab Lab Wiki - by NMÍ Kvikan
Jump to: navigation, search
(Nytsamlegir Python pakkar)
Line 40: Line 40:
  
 
=== Nytsamlegir Python pakkar ===
 
=== Nytsamlegir Python pakkar ===
* [http://pyserial.wiki.sourceforge.net/pySerial pySerial]
+
* [http://pyserial.wiki.sourceforge.net/pySerial pySerial] - Stjórna Serial (RS-232) samskiptum úr Python.
* [http://www.pythonware.com/library/tkinter/introduction/ Tkinter]
+
* [http://www.pythonware.com/library/tkinter/introduction/ Tkinter] - TK (borið fram "tick") grafísk notandaviðmót
* [http://numpy.scipy.org/ Numpy]
+
* [http://numpy.scipy.org/ Numpy] - Numerical Python ; töluleg forritun með Python
* [http://matplotlib.sourceforge.net/ Matplotlib]
+
* [http://matplotlib.sourceforge.net/ Matplotlib] - gröf og myndrit
* [http://www.pythonware.com/products/pil/ PIL]
+
* [http://www.pythonware.com/products/pil/ PIL] - Python Imaging Library - myndvinnsla með Python
  
* [http://pyopengl.sourceforge.net/ PyOpenGL]
+
* [http://pyopengl.sourceforge.net/ PyOpenGL] - OpenGL 3D grafík
* [http://www.pygame.org/news.html Pygame]
+
* [http://www.pygame.org/news.html Pygame] - Auðveld og aðgengileg leikjaforritun
  
 
== Útgáfustýring / dreifð þróunarvinna ==
 
== Útgáfustýring / dreifð þróunarvinna ==

Revision as of 10:13, 25 May 2009

Þetta er íslensk útgáfa á CBA Hello World síðunni fyrir Fab Lab smiðjurnar.


CAD/CAM

Sýnidæmi

2D vector teikning

2D raster teikning

3D

Forritun

Nytsamlegir Python pakkar

  • pySerial - Stjórna Serial (RS-232) samskiptum úr Python.
  • Tkinter - TK (borið fram "tick") grafísk notandaviðmót
  • Numpy - Numerical Python ; töluleg forritun með Python
  • Matplotlib - gröf og myndrit
  • PIL - Python Imaging Library - myndvinnsla með Python
  • PyOpenGL - OpenGL 3D grafík
  • Pygame - Auðveld og aðgengileg leikjaforritun

Útgáfustýring / dreifð þróunarvinna

  • git
    • msysgit - Git fyrir Windows
    • gitk - Grafískt notandaviðmót fyrir Git
    • git-gui - Annað grafískt notandaviðmót fyrir Git
  • [dist/siteserver.py siteserver] - Python skrifta fyrir vefþjóna sem gerir möppu að Git safni

Rafrásir / PCB

Hermun rafrása

Örstýringar

Fræsivél / Modela

  • Modela
    • stty 9600 raw -echo crtscts </dev/ttyS0
  • move x y
    • cat out.rml > /dev/ttyS0

Vínilskeri

  • CAMM-1
    • cat out.camm > /dev/parport0

Laserskeri

  • Epilog
    • cat out.epi > /dev/parport0

AVR forritun

  tiny45 load hex file, bsd cable: avrdude -p t45 -c bsd -U flash:w:file.hex
  tiny45 load hex file, dasa cable: avrdude -p t45 -P /dev/ttyUSB0 -c dasa -U flash:w:file.hex
  tiny44 load hex file: avrdude -p t44 -c bsd -U flash:w:file.hex
  tiny44 use 20 MHz xtal: avrdude -p t44 -c bsd -U lfuse:w:0x7E:m
  mega88 load hex file: avrdude -p m88 -c bsd -U flash:w:file.hex
  mega88 use 20 MHz xtal: avrdude -p m88 -c bsd -U lfuse:w:0x76:m
  mega644 load hex file: avrdude -p m644 -c bsd -U flash:w:file.hex
  mega644 use 20 MHz xtal: avrdude -p m644 -c bsd -U lfuse:w:0x76:m

Til að forritun virki gæti verið nauðsynlegt að keyra: (Sjá Linux skipanalínan)

 su
 modprobe parport
 modprobe ppdev
 chmod 777 /dev/parport0

ATtiny45 programming cable:

          7 - reset - 1 8 -
                    - 2 7 - SCK - 8
                    - 3 6 - MISO - 10
           18 - GND - 4 5 - MOSI - 9
                4   1  7  5   6          clip
  1  2  3  4  5  6  7  8  9  10 11 12 13 DB25
   14 15 16 17 18 19 20 21 22 23 24 25   DB25

in-circuit programming AMP MTA plug <- DB25M parallel (bsd) cable (wire side view):

        9        18        10
  | MOSI (3)  GND (2)  MISO (1) |
     -RESET (4)  SCK (5)
           7        8
                 | cable direction
                 v
  plug               1   3   5   4     2
  DB25  13  12  11  10   9   8   7   6   5   4   3   2   1
  DB25    25  24  23  22  21  20  19  18  17  16  15  14

in-circuit programming AMP MTA plug <- DB9F serial (dasa) cable (wire side view):

                 ^
                 | cable direction
        3        5         8
  | MOSI (3)  GND (2)  MISO (1) |
     -RESET (4)  SCK (5)
           7        4
  plug         4 3 1 5   2        
        DCD  Rx  Tx DTR GND
          DSR RTS CTS  RI
  DB9    1   2   3   4   5
  DB9      6   7   8   9
  serial programming voltage limiter: <A href=dist/dasa.cad dasa.cad]

serial AMP MTA plug <- DB9F cable (wire side view):

     Tx GND
  |  2   1 |
   3   4
   Rx DTR
      | cable direction
      v
  plug      3   2   4   1
       DCD  Rx  Tx DTR GND
         DSR RTS CTS  RI
  DB9   1   2   3   4   5
  DB9     6   7   8   9

Molex serial PCB connector:

  1   2   3   4
  Rx  Tx  DTR Gnd

Molex serial cable:

  4   3   2   1
  Gnd DTR Tx  Rx DCD
   RI  CTS RTS DSR
  5   4   3   2  1
   9   8   7   6
  PIN   PURPOSE              SIGNAL NAME  HEADER
  Pin 1 Data Carrier Detect  DCD
  Pin 2 Received Data        RxData       1
  Pin 3 Transmitted Data     TxData       2
  Pin 4 Data Terminal Ready  DTR          3
  Pin 5 Signal Ground        Gnd          4
  Pin 6 Data Set Ready       DSR
  Pin 7 Request To Send      RTS
  Pin 8 Clear To Send        CTS
  Pin 9 Ring Indicator%09      RI

Hello-world rafrásir