Shop OBEX P1 Docs P2 Docs Learn Events
PINK Program help — Parallax Forums

PINK Program help

lfreezelfreeze Posts: 174
edited 2010-08-03 00:57 in Propeller 1
Please HELP>>>>>>>>>>>>>>>
I have spent many hours trying to write a Spin email program for the PINK module.
I am trying to write a SPIN program of just the bare bones needed to send an email message. I first tried the PINK program in the object exchange. I was unable to make it work. The object is written for a Spin Stamp Board, and to be honest, is about three levels above my skill set. I then took the Stamp program that came with the Pink module from Parallax. I took out the essential elements and converted them to spin. The program ran but never generated an email message. I suspect I missed some element that is needed, or my coding is bad.

When I initially received the Pink module, I did all of the configurations and also installed the firmware update provided by Tech support. The Stamp program did work and I was able to receive emails generated by the PINK module.

Attached to this post is the Stamp program provided with the module.

Here is the Spin program I am trying to use:
(I have omitted the actual addresses)


CON

_clkmode = xtal1+pll8x
_xinfreq = 10_000_000

' propeller xmit to pink receive pin 10
' propeller receive to pink xmit pin 11

OBJ
ser : "FullDuplexSerial"

pub main

ser.start(11, 10, 0, 9600)

ser.str(string("NB0WET:xxxxx@comcast.net")) 'send message to
ser.str(string("0"))

ser.str(string("NB0WEF:xxxxx@comcast.net")) 'message is from
ser.str(string("0"))

ser.str(string("NB0WES:this is the subject line")) 'subject line
ser.str(string("0"))

ser.str(string("NB0WEC:this is the message content")) 'message content
ser.str(string("0"))

ser.str(string("NB0WEV:smtp.comcast.net")) 'smtp info
ser.str(string("0"))

Post Edited (lfreeze) : 8/2/2010 11:07:04 PM GMT

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-08-02 21:55
    You might want to put a descriptive title on your posting so people know you need help and what it is you need help with. Click on the pencil icon in the upper right hand corner and you can edit your post.


    As for posting samples of your code, place your code between these two tags except remove ALL of the empty spaces

    [noparse][[/noparse] code ]

    [noparse][[/noparse] / code ]



    That way your code
      will preserve
        the proper indentation
    
    
  • Dave HeinDave Hein Posts: 6,347
    edited 2010-08-02 22:47
    It's been a long time since I've worked with a Stamp, but I see a few differences between the two programs.· The Stamp is transmitting at 2400 buad, and the Prop is set for 9600 baud.· It looks like the Stamp is sending a CLS character after each string.· I am guessing this is the Clear Screen character, which is a zero byte, correct?· Your Spin code is sending the ASCII character for·"0"·after each command, which isn't the same thing.· If you want to send a zero byte you would have to use ser.tx(0) instead of ser.str(string("0")).· ser.str(string("0")) is equivalent to calling ser.tx("0"), which is the same as ser.tx($30).
  • lfreezelfreeze Posts: 174
    edited 2010-08-03 00:57
    Thank you for the responses. I have added a subject line to the post. I did change the ser statment from ser.str(string("0") to ser.tx(0) and the baud speed to
    2400. When I ran the program again, it did send an email. Several subsequent runs did not work. I rebooted the pink module and relaoded the pink firmware update. I ran the program again and it sent another email. I tried several more runs and it did not send any messages. I'm totally confused by this behavior and
    think it may be a timing issue or a pink problem.
    I believe the program issue is resolved, a big thank you for your help. I will try some variations on the config page and if it continues to fail,
    I'll appeal to Parallax for an RMA number..

    Larry
Sign In or Register to comment.