circ-01 picaxe version - more work needed

Upload: sa29ras

Post on 03-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Circ-01 Picaxe Version - More Work Needed

    1/2

    Arduinopin 13

    LED(light emitting diode)

    resistor (330ohm)(orange-orange-brown)

    gnd(ground) (-)

    08

    CIRC-01

    WHAT WERE DOING:

    .:Getting Started:.

    .:(Blinking LED):.

    LEDs (light emitting diodes) are used in all sorts of clever things

    which is why we have included them in this kit. We will start off

    with something very simple, turning one on and off, repeatedly,

    producing a pleasant blinking effect. To get started, grab the parts

    listed below, pin the layout sheet to your breadboard and then plug

    everything in. Once the circuit is assembled you'll need to upload the program. To do this plug the

    Picaxe Shield Base into your AXE027 cable. Then select the proper port in File > Options >Serial

    Port Tab > (the comm port of your AXE027 Cable). Next upload the program by going to

    Picaxe > Program (F5). Finally, bask in the glory and possibility that controlling lights offers.

    If you are having trouble uploading, a full trouble shooting guide can be found here:

    http://www.picaxe.com/Getting-Started/Technical-Support/

    Wire5mm Yellow LEDx1

    330 Ohm ResistorOrange-Orange-Brownx1

    2 Pin Headerx4

    CIRC-01Breadboard Sheetx1

    Parts:

    .:download:.

    breadboard layout sheethttp://ardx.org/BBLS01S

    .:view:.assembly video

    http://ardx.org/VIDE01

    The Internet

    longer lead+

    THE CIRCUIT:

    Schematic

  • 7/29/2019 Circ-01 Picaxe Version - More Work Needed

    2/2

    NOT WORKING?(3 things to try)

    CODE(no need to type everything in just click)

    09

    CIRC-01Web address coming soontext file on the picaxe forum blogs

    /'header to be included when i have finalised the look for all programs

    #sim axe401 'for simulation - the board you are using

    #picaxe28x2 'the picaxe chip installed in the picaxe shield base

    symbol ledpin = s.13 'led connected to pin s.13

    'this line added after help with day 3 - see the discussion when i publish itdirS.13 = 1 'set s.13 as an output

    dohigh ledpin 'turn on the ledpause 1000 'wait 1 second (1000 milli seconds)low ledpin 'turn off the ledpause 1000 wait 1 second

    loop repeat

    More details, where to buy more parts, where to ask more questions:

    http://ardx.org/CIRC01

    LED Not Lighting Up?LEDs will only work in one

    direction. Try taking it out and

    twisting it 180 degrees.

    (no need to worry, installing it

    backwards does no permanent

    harm).

    Changing the pin: Control the brightness:The LED is connected to pin S.13 but we can use any of Along with digital (on/off) control the Arduino can control

    the picaxe shield based pins. To change it take the wire some pins in an analog (brightness) fashion. (more details on

    plugged into pin S.13 and move it to a pin of your choice this in later circuits). To play around with it.

    (from 0-13) (you can also use analog A0-A5) Change the LED to pin S.9: (also change the wire)symbol ledpin = S.9 and dirS.9 = 1

    Then in the code change the lines:

    Add in the following code before the loop:pwmout ledpin,150,150Replace the code inside the loop with:Then upload the program: (F5)pwmduty ledpin, 50

    Change the blink time: this will be a not so bright led - change that value for 0 to 150Unhappy with one second on one second off?

    Fading:

    In the code change the lines: We will use another included example program. To open go to high ledpin

    See the extra text file for this examplepause time on //(seconds * 1000)low ledpin Then upload to your board and watch as the LED fades in andpause time off //(seconds * 1000)

    then out.

    symbol ledpin = S.newpin and dirS.newpin

    Still No Success?A broken circuit is no fun, send

    us an e-mail and we will get

    back to you as soon as we can.

    [email protected]

    Program Not Uploading

    This happens sometimes,

    the most likely cause is a

    confused serial port, you

    can change this in

    file>options>

    MAKINGIT BETTER

    MORE, MORE, MORE: