<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Dromes4All : The First Prototype</title><link>/challenges-projects/project14/attackofthedrones/b/blog/posts/dromes4all-the-first-prototype</link><description>Having decided to have a go at making some drones, based on the fact that I have four plastic domes and Nanos I have now progressed to an initial prototype. My plan is to make four identical domed drones (I will now call them Dromes) which will be ab</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Dromes4All : The First Prototype</title><link>https://community.element14.com/challenges-projects/project14/attackofthedrones/b/blog/posts/dromes4all-the-first-prototype</link><pubDate>Wed, 28 Apr 2021 10:32:55 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:48dfd4f2-c160-4541-bcee-4e3254ab867e</guid><dc:creator>dubbie</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Bartosz,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I wonder if it would work outside so that the cats digging in my garden would become so entranced they would forget to dig/poo?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Dubbie&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=11210&amp;AppID=289&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Dromes4All : The First Prototype</title><link>https://community.element14.com/challenges-projects/project14/attackofthedrones/b/blog/posts/dromes4all-the-first-prototype</link><pubDate>Sat, 24 Apr 2021 20:04:41 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:48dfd4f2-c160-4541-bcee-4e3254ab867e</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice build.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=11210&amp;AppID=289&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Dromes4All : The First Prototype</title><link>https://community.element14.com/challenges-projects/project14/attackofthedrones/b/blog/posts/dromes4all-the-first-prototype</link><pubDate>Fri, 23 Apr 2021 21:55:49 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:48dfd4f2-c160-4541-bcee-4e3254ab867e</guid><dc:creator>bartokon</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-48dfd4f2-c160-4541-bcee-4e3254ab867e/contentimage_5F00_2516.png:16:16]&lt;/span&gt; Great work!&lt;/p&gt;&lt;p&gt;But in my honest opinion duck-tape sentry guns are the best! &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-48dfd4f2-c160-4541-bcee-4e3254ab867e/contentimage_5F00_938.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span id="9ae4c0c9_a256_439c_a441_b1b0ad863d54"&gt;&lt;span&gt;[View:https://players.brightcove.net/1362235890001/NkxiVJdjx_default/index.html?videoId=6250086693001:740:466]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;CPP&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=%2F*%0A+*+SilnikKrokowy.cpp%0A+*%0A+*++Created+on%3A+Apr+11%2C+2021%0A+*++++++Author%3A+LOLNO%0A+*%2F%0A%0A%0A%23include+%3CSilnikKrokowy.h%3E%0A%0A%0ASilnikKrokowy%3A%3ASilnikKrokowy%28%0AGPIO_TypeDef+*GPA1%2C+uint16_t+GPA_Pin1%2C%0AGPIO_TypeDef+*GPB2%2C+uint16_t+GPB_Pin2%2C%0AGPIO_TypeDef+*GPC3%2C+uint16_t+GPC_Pin3%2C%0AGPIO_TypeDef+*GPD4%2C+uint16_t+GPD_Pin4%29%7B%0A%0A%0A%2F%2FSet+pins+for+control+stepper%0AGPA+%3D+GPA1%3B%0AGPB+%3D+GPB2%3B%0AGPC+%3D+GPC3%3B%0AGPD+%3D+GPD4%3B%0AGPA_Pin+%3D+GPA_Pin1%3B%0AGPB_Pin+%3D+GPB_Pin2%3B%0AGPC_Pin+%3D+GPC_Pin3%3B%0AGPD_Pin+%3D+GPD_Pin4%3B%0A%0A%0A%0A%0A%2F%2FSet+all+outputs+to+0%0AHAL_GPIO_WritePin%28GPA%2C+GPA_Pin%2C+%28GPIO_PinState%29+0%29%3B%0AHAL_GPIO_WritePin%28GPB%2C+GPB_Pin%2C+%28GPIO_PinState%29+0%29%3B%0AHAL_GPIO_WritePin%28GPC%2C+GPC_Pin%2C+%28GPIO_PinState%29+0%29%3B%0AHAL_GPIO_WritePin%28GPD%2C+GPD_Pin%2C+%28GPIO_PinState%29+0%29%3B%0A%0A%0AGP%5B0%5D+%3D+GPA%3B%0AGP%5B1%5D+%3D+GPB%3B%0AGP%5B2%5D+%3D+GPC%3B%0AGP%5B3%5D+%3D+GPD%3B%0A%0A%0AGP_PIN%5B0%5D+%3D+GPA_Pin%3B%0AGP_PIN%5B1%5D+%3D+GPB_Pin%3B%0AGP_PIN%5B2%5D+%3D+GPC_Pin%3B%0AGP_PIN%5B3%5D+%3D+GPD_Pin%3B%0A%0A%0A%7D%3B%0A%0A%0Avoid+SilnikKrokowy%3A%3AturnCW%28%29%7B%0A%0A%0Aact_pos+%2B%3D+1%3B%0A%0A%0AHAL_GPIO_WritePin%28GPA%2C+GPA_Pin%2C+%28GPIO_PinState%29+1%29%3B%0A%2F%2Fdelay%0AHAL_Delay%28delay_time%29%3B%0AHAL_GPIO_WritePin%28GPA%2C+GPA_Pin%2C+%28GPIO_PinState%29+0%29%3B%0AHAL_GPIO_WritePin%28GPB%2C+GPB_Pin%2C+%28GPIO_PinState%29+1%29%3B%0A%2F%2Fdelay%0AHAL_Delay%28delay_time%29%3B%0AHAL_GPIO_WritePin%28GPB%2C+GPB_Pin%2C+%28GPIO_PinState%29+0%29%3B%0AHAL_GPIO_WritePin%28GPC%2C+GPC_Pin%2C+%28GPIO_PinState%29+1%29%3B%0A%2F%2Fdelay%0AHAL_Delay%28delay_time%29%3B%0AHAL_GPIO_WritePin%28GPC%2C+GPC_Pin%2C+%28GPIO_PinState%29+0%29%3B%0AHAL_GPIO_WritePin%28GPD%2C+GPD_Pin%2C+%28GPIO_PinState%29+1%29%3B%0A%2F%2Fdelay%0AHAL_Delay%28delay_time%29%3B%0AHAL_GPIO_WritePin%28GPD%2C+GPD_Pin%2C+%28GPIO_PinState%29+0%29%3B%0A%0A%0A%7D%3B%0A%0A%0Avoid+SilnikKrokowy%3A%3AturnCCW%28%29%7B%0A%0A%0Aact_pos+-%3D+1%3B%0A%0A%0AHAL_GPIO_WritePin%28GPD%2C+GPD_Pin%2C+%28GPIO_PinState%29+1%29%3B%0A%2F%2Fdelay%0AHAL_Delay%28delay_time%29%3B%0AHAL_GPIO_WritePin%28GPD%2C+GPD_Pin%2C+%28GPIO_PinState%29+0%29%3B%0AHAL_GPIO_WritePin%28GPC%2C+GPC_Pin%2C+%28GPIO_PinState%29+1%29%3B%0A%2F%2Fdelay%0AHAL_Delay%28delay_time%29%3B%0AHAL_GPIO_WritePin%28GPC%2C+GPC_Pin%2C+%28GPIO_PinState%29+0%29%3B%0AHAL_GPIO_WritePin%28GPB%2C+GPB_Pin%2C+%28GPIO_PinState%29+1%29%3B%0A%2F%2Fdelay%0AHAL_Delay%28delay_time%29%3B%0AHAL_GPIO_WritePin%28GPB%2C+GPB_Pin%2C+%28GPIO_PinState%29+0%29%3B%0AHAL_GPIO_WritePin%28GPA%2C+GPA_Pin%2C+%28GPIO_PinState%29+1%29%3B%0A%2F%2Fdelay%0AHAL_Delay%28delay_time%29%3B%0AHAL_GPIO_WritePin%28GPA%2C+GPA_Pin%2C+%28GPIO_PinState%29+0%29%3B%0A%0A%0A%7D%3B%0A%0A%0Avoid+SilnikKrokowy%3A%3Agenerate_in_range%28uint8_t+divider%29%7B%0Aif+%28turn_steps+%3D%3D+0+%29%7B%0Aint32_t+random_number+%3D+0%3B%0Awhile+%281%29%7B%0Arandom_number+%3D+random%28%29%25%28limit_steps%2B1%29+-+limit_steps%2F2%3B%0Aif+%28%28abs%28act_pos%2Brandom_number%29+%3C+limit_steps%29+and+%28abs%28random_number%29+%3E+divider%29%29+break%3B%0A%7D%0A%0A%0Aturn_steps+%3D+random_number%3B%0A%7D%0A%7D%3B%0A%0A%0Avoid+SilnikKrokowy%3A%3Arotate%28int32_t+max_steps%29%7B%0A%0A%0Aint32_t+loc_var+%3D+0%3B%0A%0A%0Ado+%7B%0Aif+%28turn_steps+%3E+0%29%7B%0AturnCW%28%29%3B%0Aturn_steps+-%3D+1%3B%0Aloc_var+%2B%3D+1%3B%0A%7D%0Aelse+if+%28turn_steps+%3C+0%29%7B%0AturnCCW%28%29%3B%0Aturn_steps+%2B%3D+1%3B%0Aloc_var+%2B%3D+1%3B%0A%7D+else+%7Bbreak%3B+%7D%0A%7D+while+%28loc_var+%3D%3D+max_steps%29%3B%0A%7D%3B%0A%0A%0A%0A%0ASilnikKrokowy%3A%3A%7ESilnikKrokowy%28%29%7B%0A%2F%2F+TODO+Auto-generated+destructor+stub%0A%7D%3B]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Header&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=%2F*%0A+*+SilnikKrokowy.h%0A+*%0A+*++Created+on%3A+Apr+11%2C+2021%0A+*++++++Author%3A+LOLNO%0A+*%2F%0A%0A%0A%23ifndef+INC_SILNIKKROKOWY_H_%0A%23define+INC_SILNIKKROKOWY_H_%0A%23define+FULL_ROTATION_STEPS+2038+%2F%2FFull+rotation%0A%23define+delay_time+6%0A%23include+%3Cstdint.h%3E%0A%23include+%3Cstdlib.h%3E%0A%23include+%3Ctime.h%3E%0A%23include+%3Cmath.h%3E%0A%23include+%22stm32l0xx_hal.h%22%0Aclass+SilnikKrokowy+%7B%0Apublic%3A%0ASilnikKrokowy%28%0AGPIO_TypeDef+*GPA%2C+uint16_t+GPA_Pin%2C%0AGPIO_TypeDef+*GPB%2C+uint16_t+GPB_Pin%2C%0AGPIO_TypeDef+*GPC%2C+uint16_t+GPC_Pin%2C%0AGPIO_TypeDef+*GPD%2C+uint16_t+GPD_Pin%0A%29%3B%0A%0A%0A%2F%2FTurning+management%0Avoid+rotate%28int32_t+max_steps%29%3B%0A%0A%0A%2F%2FLimit+10%2C+can%27t+return+%3E10%3B+range+-%3E+to+limit+possible+random+numbers+generated%0A%2F%2FLimit_real+%3D+act_pos+%2B+random+%3C+limit_steps%3B%0Avoid+generate_in_range%28uint8_t+divider%29%3B%0A%0A%0A%2F%2FConstrain+rotation%2C+so+we+don%27t+end+up+tangled+in+wires%0A%0A%0Astatic+const+int32_t+MAX_STEPS+%3D+FULL_ROTATION_STEPS%3B%0Aint32_t+limit_steps+%3D+0%3B+%2F%2F+%2F2+%2B-+radius%0A%0A%0A%2F%2FPin+definitions%0AGPIO_TypeDef+*GPA%3B+uint16_t+GPA_Pin%3B%0AGPIO_TypeDef+*GPB%3B+uint16_t+GPB_Pin%3B%0AGPIO_TypeDef+*GPC%3B+uint16_t+GPC_Pin%3B%0AGPIO_TypeDef+*GPD%3B+uint16_t+GPD_Pin%3B%0A%0A%0AGPIO_TypeDef+*GP%5B4%5D%3B%0Auint16_t+GP_PIN%5B4%5D%3B%0A%0A%0A%2F%2FActual+position%0Aint32_t+act_pos+%3D+0%3B%0A%0A%0Aint32_t+turn_steps+%3D+0%3B%0A%0A%0Avirtual+%7ESilnikKrokowy%28%29%3B%0Aprivate%3A%0A%0A%0A%2F%2FTurn+one+step%0Avoid+turnCW%28%29%3B++%2F%2FClockwise%0Avoid+turnCCW%28%29%3B+%2F%2FCounter+Clockwise%0A%0A%0A%7D%3B%0A%0A%0A%0A%0A%23endif+%2F*+INC_SILNIKKROKOWY_H_+*%2F]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;Main loop&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=%2F%2FFor+random+number+generator%0Asrand+%28time%28NULL%29%29%3B%0A%0A%0ASilnikKrokowy+Y_axis%28serwo1_1_GPIO_Port%2C+serwo1_1_Pin%2C%0Aserwo1_2_GPIO_Port%2C+serwo1_2_Pin%2C%0Aserwo1_3_GPIO_Port%2C+serwo1_3_Pin%2C%0Aserwo1_4_GPIO_Port%2C+serwo1_4_Pin%0A%29%3B%0A%0A%0ASilnikKrokowy+X_axis%28serwo2_1_GPIO_Port%2C+serwo2_1_Pin%2C%0Aserwo2_2_GPIO_Port%2C+serwo2_2_Pin%2C%0Aserwo2_3_GPIO_Port%2C+serwo2_3_Pin%2C%0Aserwo2_4_GPIO_Port%2C+serwo2_4_Pin%0A%29%3B%0A%0A%0Auint8_t+x_const+%3D+12*3%3B%0Auint8_t+y_const+%3D+12*2%3B+%2F%2F+12+%3D+180+stopni+cos+kolo%0A%0A%0Auint8_t+rot_div+%3D+8%3B%0AX_axis.limit_steps+%3D+X_axis.MAX_STEPS%2Fx_const%3B%0AY_axis.limit_steps+%3D+Y_axis.MAX_STEPS%2Fy_const%3B%0A%0A%0A%0A%0A++%2F*+USER+CODE+END+2+*%2F%0A%0A%0A++%2F*+Infinite+loop+*%2F%0A++%2F*+USER+CODE+BEGIN+WHILE+*%2F%0A++while+%281%29%0A++%7B%0A%0A%0A++if+%28X_axis.turn_steps+%3D%3D+0%29+X_axis.generate_in_range%2820%29%3B%0A++if+%28Y_axis.turn_steps+%3D%3D+0%29+Y_axis.generate_in_range%2820%29%3B%0A%0A%0A++X_axis.rotate%28X_axis.MAX_STEPS%29%3B+%2F%2FV%5E%0A++Y_axis.rotate%28Y_axis.MAX_STEPS%29%3B+%2F%2F%3C%3E%0A%0A%0A%0A%0A++++%2F*+USER+CODE+END+WHILE+*%2F%0A%0A%0A++++%2F*+USER+CODE+BEGIN+3+*%2F%0A++%7D%0A++%2F*+USER+CODE+END+3+*%2F%0A%7D]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;img src="https://community.element14.com/aggbug?PostID=11210&amp;AppID=289&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>