does this work?


Closed Thread
Results 1 to 9 of 9

Thread: does this work?

  1. #1
    igor@24's Avatar
    igor@24 Guest

    Talking does this work?

    I am a total newbie. I'm 14 yrs old and i like to code (I know Visual Basic and I'm learning C++). I do not have any microcontroller, I just know what's that ))

    But I like to code ...

    So, I wonder if this works:
    (send message to lcd display):

    lcdout "Hello"

    And, one more question; here is the code:

    '=========================
    '=========================
    'by Branko Zupan
    '=========================

    VarB X
    VarB Y

    Low B1
    Low B2

    Sound B3, 1000, 300, 1200, 200
    Pause 1000
    Beep B3


    Naprej:
    Y = 1

    Do

    X = 1
    Do
    Pulsout B1, 180
    Pulsout B2, 180
    Inc X
    Pause 10
    Loop until X = 25

    X = 1

    Do
    Pulsout B1, 120
    Pulsout B2, 180
    Inc X
    Pause 10
    Loop until X = 25

    X = 1

    Do
    Pulsout B1, 120
    Pulsout B2, 120
    Inc X
    Pause 10
    Loop until X = 25

    X = 1

    Do
    Pulsout B1, 180
    Pulsout B2, 120
    Inc X
    Pause 10
    Loop until X = 25

    Inc Y
    Loop until Y = 10

    GoTo Naprej

    Inter 0

    Sound B3, 1000, 200, 1200, 100
    Beep B3

    Y = 1
    Do

    X = 1
    Do
    Pulsout B1, 180
    Pulsout B2, 180
    Inc X
    Pause 10
    Loop until X = 15

    X = 1
    Do
    Pulsout B1, 180
    Pulsout B2, 120
    Inc X
    Pause 10
    Loop until X = 15

    X = 1
    Do
    Pulsout B1, 120
    Pulsout B2, 120
    Inc X
    Pause 10
    Loop until X = 15

    X = 1
    Do
    Pulsout B1, 120
    Pulsout B2, 180
    Inc X
    Pause 10
    Loop until X = 15

    Inc Y
    Loop until Y = 3

    EndInter

    I want to know what is "pulsout". And one more question
    Pulsout B1,120
    What does this number (120) means? Steps? (this is a code for robot)

    Please help me!

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Igor,

    Yes, lcdout "Hello" would work with PBP.

    However, the rest of your program appears to be written for PROTON+

    A better place to ask your question would be at ...

    http://www.picbasic.org/forum/

    Best regards,
       Darrel

  3. #3
    igor@24's Avatar
    igor@24 Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    Darrel, thank you a lot!
    But now I have more questions?
    1. What is PROTON+ (programming language?) ?
    2. What is this for and how to use it :
    Expi+
    Expo
    LookUp &LookDown
    Beep (beep sound?)
    (how to use it - i mean to write me something like this: LookDown something something...)
    Is this code right:

    counter var word
    pulse var word

    for counter = 1 to 50
    gosub walk_left
    gosub walk_right
    next


    Sound 35,120
    walk_left:
    for pulse = 0 to 10
    pulsout 15, 820
    pause 20
    next
    for pulse = 0 to 10
    pulsout 14, 600
    pause 20
    next
    Beep 35
    return

    walk_right:
    for pulse = 0 to 10
    pulsout 15, 680
    pause 20
    next
    for pulse = 0 to 10
    pulsout 14, 900
    pause 20
    next
    return

    lcdout "Hello"
    lcdout "visit http://www.igorbogetic.co.sr"

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Yes Proton is a programming language. It is very similar to PicBasic Pro, with some added functionality.

    You can find out everything about it at

    http://www.picbasic.org/proton_compiler.php

    I have no idea what Expi+ and Expo are. But for the rest, download the user guide at the above link.

    Darrel

  5. #5
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Thumbs up Hi igor,

    It seems that you are learning VB and C++ and having great fun. You dropped into this forum and it interested you. I will try to explain a little bit on microcontroller (the PIC micro) and what PICBasic or Proton is through a personal email. If you need to have a taste of the same. You will need a few tools to build the electronics and have more fun. I am on very tight schedules but would love to hep you get into microcontrollers.

    Regards

    Sougata

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Igor,

    i wish one day i could go back in time and learn all of what you already and will learn with the age you have. You can't imagine how many future job are waiting for you. In the past, computer language and MicroController was really different than now. I remind really well to save/load my program on/from an audio tape... sorry fellows here if i make you feel older now ;o)

    Welcome to the PIC world and good luck!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    igor@24's Avatar
    igor@24 Guest


    Did you find this post helpful? Yes | No

    Default

    Sougata, Mister_e, Thank you!
    I want to learn and learn ...
    This is the best forum i have ever seen.
    I will check my mail now.

  8. #8
    igor@24's Avatar
    igor@24 Guest


    Did you find this post helpful? Yes | No

    Default

    Hi! I have made another programme. Sample files (PBP compiler) helped me doing that.

    Code:

    char var byte

    start: Hserout ["http://www.igorbogetic.co.sr", 13, 10]

    slanje: Hserout [char]

    lcd: Lcdout $fe, 1
    Lcdout "Hi!"
    Pause 500

    Lcdout $fe, 1
    Lcdout "Visit http://www.igorbogetic.co.sr"
    Pause 500

    LED: High 0
    Pause 200

    Low 0
    Pause 200

    SO con 0
    B con 5
    N2400 con 4

    B0 var byte

    B0 = 0
    loop: Button B,1,10,5,B0,0,notp
    Goto lcd
    Goto LED
    Goto slanje
    notp: Serout SO,N2400,[#B0,13,10]
    Pause 100
    Goto loop
    End

    Can that work? If there is any error please write!
    Thank you on your help.
    Igor

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    when posting, let us know wich pic you're using, the crystal speed. and then we can give a hand on that.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. pls help me verify my code not work, why???
    By chai98a in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th January 2010, 09:19
  2. Can't get POT work on P12f675 - Newbie
    By berslan in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 26th March 2008, 21:22
  3. How to set ICD-2 clone to work with PBP?
    By G-R-C in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th October 2006, 02:50
  4. blink.bas help cant make any 18f's work
    By Bonxy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 13th December 2004, 21:28
  5. Pin RA4 doesn't work
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 15th July 2004, 12:03

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts