<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Raspberry Pi traffic light project, part 2</title>
	<atom:link href="http://www.suppertime.co.uk/blogmywiki/2015/10/raspberry-pi-traffic-light-project-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.suppertime.co.uk/blogmywiki/2015/10/raspberry-pi-traffic-light-project-part-2/</link>
	<description>reading, writing, coding, making</description>
	<lastBuildDate>Tue, 24 Oct 2023 13:43:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: Morcegolas</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2015/10/raspberry-pi-traffic-light-project-part-2/#comment-88812</link>
		<dc:creator>Morcegolas</dc:creator>
		<pubDate>Sat, 21 May 2016 22:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=2167#comment-88812</guid>
		<description>&lt;code&gt;from gpiozero import LED, Button
from time import sleep

red = LED(25)
amber = LED(8)
green = LED(7)
button = Button(21)

print(&quot;Press the button when you want to cross.&quot;)

green.on()
amber.off()
red.off()

def cicle1():
	while True:
		green.off()
		amber.on()
		sleep(5)
		amber.off()
		red.on()
		print(&quot;Cross now.&quot;)
		sleep(10)
		amber.on()
		sleep(5)
		green.on()
		amber.off()
		red.off()
		sleep(50)

cicle1()

# 		if button.is_pressed:
# 		restart cycle1()	#if a pedestrian push the button it goes yellow and red immediately
							#so he can cross, if not the cicle1() continues and the green
							#led continues on for 50s
&lt;/code&gt;


This is want I&#039;m trying to achieve, but as I don&#039;t know how to programming I hope you can help me. 

Thanks.</description>
		<content:encoded><![CDATA[<p><code>from gpiozero import LED, Button<br />
from time import sleep</p>
<p>red = LED(25)<br />
amber = LED(8)<br />
green = LED(7)<br />
button = Button(21)</p>
<p>print("Press the button when you want to cross.")</p>
<p>green.on()<br />
amber.off()<br />
red.off()</p>
<p>def cicle1():<br />
	while True:<br />
		green.off()<br />
		amber.on()<br />
		sleep(5)<br />
		amber.off()<br />
		red.on()<br />
		print("Cross now.")<br />
		sleep(10)<br />
		amber.on()<br />
		sleep(5)<br />
		green.on()<br />
		amber.off()<br />
		red.off()<br />
		sleep(50)</p>
<p>cicle1()</p>
<p># 		if button.is_pressed:<br />
# 		restart cycle1()	#if a pedestrian push the button it goes yellow and red immediately<br />
							#so he can cross, if not the cicle1() continues and the green<br />
							#led continues on for 50s<br />
</code></p>
<p>This is want I&#8217;m trying to achieve, but as I don&#8217;t know how to programming I hope you can help me. </p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: blogmywiki</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2015/10/raspberry-pi-traffic-light-project-part-2/#comment-85749</link>
		<dc:creator>blogmywiki</dc:creator>
		<pubDate>Tue, 20 Oct 2015 11:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=2167#comment-85749</guid>
		<description>Thank you. I&#039;m &lt;a href=&quot;https://twitter.com/blogmywiki&quot; rel=&quot;nofollow&quot;&gt;@blogmywiki&lt;/a&gt; on Twitter</description>
		<content:encoded><![CDATA[<p>Thank you. I&#8217;m <a href="https://twitter.com/blogmywiki" rel="nofollow">@blogmywiki</a> on Twitter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stewart</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2015/10/raspberry-pi-traffic-light-project-part-2/#comment-85748</link>
		<dc:creator>stewart</dc:creator>
		<pubDate>Tue, 20 Oct 2015 11:29:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=2167#comment-85748</guid>
		<description>I cannot find a  like button or similar to follow you.

Great work</description>
		<content:encoded><![CDATA[<p>I cannot find a  like button or similar to follow you.</p>
<p>Great work</p>
]]></content:encoded>
	</item>
</channel>
</rss>
