Remote Start Van

Hi everyone,

I am pretty much a noob but looking to move on up. I am wokring on a project to and thought i had all i needed until i installed blynk on my iphone.

bascially i have writen a script using python to click an relay on for 1.5 seconds then turn off after. when teh relay kicks on and turns off that is acting the same way as if I take my transmitter for my car and pressed the remote start button to start my van.

Here is my problem, if I run the script from python all works perfect and van starts. But when i run it from Blynk app on my iphone the button stays on until i turn it off again but this cause the remote start to fail and it shuts the van off.

My question is how do i get this corrected? I am thinking i need to have a button within blynk that will act like a momentary button not a push on push off or switch on switch off type… Is this even possible?

Any help or guidance would be appreciated greatly…

Please let us see your blynk code.
Else we can’t help you.

Hi Alexis

sorry about that i forgot. here you go

#!/usr/bin/python

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)

# init list with pin numbers

pinList = [17,]

# loop through pins and set mode and state to 'low'

for i in pinList: 
    GPIO.setup(i, GPIO.OUT) 
    GPIO.output(i, GPIO.HIGH)

# time to sleep between operations in the main loop

SleepTimeL = 1.5

# main loop

try:
  GPIO.output(17, GPIO.LOW)
  GPIO.output(17, GPIO.HIGH)
  print "ONE"
  time.sleep(SleepTimeL); 
  GPIO.cleanup()
  print "Good bye!"

# End program cleanly with keyboard

except KeyboardInterrupt:
  print "  Quit"

  # Reset GPIO settings

  GPIO.cleanup()

You’ll have to format your code property…I have a solution coded for an esp8266 using Arduino IDE. If you think this will help let me know.

image

sorry i really am a new guy to this coding thing but i am willing to learn because it seems very fun. Can you please explain a bit more dumb it down for me a bit? I know that hand holding isn’t really accepted but i could use all the help.

what did i do wrong that you are saying i didn’t format correctly? everything seems to be working when i run the script.

thank you

No problems… Just when you post code on this forum its a standard that it’s formatted correctly… Eg…

Correctly formatted code

Oh I see what you are talking about. ok thank you

I am using Raspberry PI 3 B don’t believe i stated that…