tag:blogger.com,1999:blog-4717269872457503530.post8619507343800136788..comments2023-11-20T02:38:38.279-05:00Comments on Raspberry Pi Python Adventures: Pi-A-SketchFrancois Dionhttp://www.blogger.com/profile/10442105466634552900noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-4717269872457503530.post-44814926911990856952013-03-22T00:44:36.237-04:002013-03-22T00:44:36.237-04:00Hi friend, really this blog is very informative an...Hi friend, really this blog is very informative and the process of exposing about Pi-A-Sketch is very interesting. The images are also looking so beautiful.<br /><br />Thanks,<br /><a href="http://www.energyholder.com" rel="nofollow">Lithium polymer battery</a>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4717269872457503530.post-51112865804467193232013-02-03T15:14:51.451-05:002013-02-03T15:14:51.451-05:00The per-clock-tick loop is the App.run() method in...The per-clock-tick loop is the App.run() method in main.py.<br /><br />This calls curveset.drawpoints() currently because I sequence through a list of pattern combinations and except for Harmonographs, I usually draw two different ones simultaneously. You can simplify this for the case of a single harmonograph by calling the Harmonograph instance's drawFunc method:<br /><br /> def drawFunc(self, screen, color, start, end, dummy1, dummy2):<br /> # print (start,end)<br /> # print color<br /> pygame.draw.aaline(screen, color, start, end)<br /><br />replace the "pygame.draw.aaline" with whatever the EtchaSketch's line draw API is. Ignore the color obviously!Digital Larryhttps://www.blogger.com/profile/02981483745969663010noreply@blogger.comtag:blogger.com,1999:blog-4717269872457503530.post-24132948252841262702013-02-03T15:00:47.631-05:002013-02-03T15:00:47.631-05:00I have written Python routines (using the PyGame l...I have written Python routines (using the PyGame library) to draw spirographs and harmonographs on the Pi and PC/Mac/Android:<br /><br />https://github.com/Digital-Larry/curves-python/blob/master/curve.py<br /><br />The harmonograph routine already uses a continuous line drawing approach so would probably work quite directly on this project with some minor tweaks to the code. <br /><br />This application also has a "main.py" file at the same location in GitHub.<br /><br />To draw a Harmonograph I would:<br /><br />Instanciate a Harmonograph:<br /><br />class HarmonoGraph(Curve):<br /> def __init__(self, width, height, screen):<br /> print "==> HarmonoGraph init!"<br /> super(HarmonoGraph, self).__init__(width, height, screen)<br /><br /><br />width and height are pixels, and screen is the PyGame screen structure handle which we use for drawing into. This would have to change to adapt to the drawing API on the sketch.<br /><br />Digital Larryhttps://www.blogger.com/profile/02981483745969663010noreply@blogger.comtag:blogger.com,1999:blog-4717269872457503530.post-1992541137976328412013-01-15T22:38:20.187-05:002013-01-15T22:38:20.187-05:00Hi John,
The steppers I've had since last sum...Hi John,<br /><br />The steppers I've had since last summer. But the daughterboard is yours. There is an interesting story behind how/why I ended up using it:<br /><br />http://raspberry-python.blogspot.com/2013/01/pyhacking-step-by-step.html<br /><br />Francois Dionhttps://www.blogger.com/profile/10442105466634552900noreply@blogger.comtag:blogger.com,1999:blog-4717269872457503530.post-29296332393739075702013-01-15T22:36:21.899-05:002013-01-15T22:36:21.899-05:00No need to disconnect anything, you just flip it a...No need to disconnect anything, you just flip it and put if back down and try again.<br /><br />There is a serial connection on the GPIO, but it needs level conversion. It is however an interesting tought. Perhaps I'll investigate this.Francois Dionhttps://www.blogger.com/profile/10442105466634552900noreply@blogger.comtag:blogger.com,1999:blog-4717269872457503530.post-48426772995415599902013-01-14T15:28:36.516-05:002013-01-14T15:28:36.516-05:00Thats my board mounted in that Pi and my stepper m...Thats my board mounted in that Pi and my stepper motors ! You can see them at MyPiShop.com (Underconstruction) or buy them on ebay (Search "raspberry stepper gpio").<br /><br />NICE application.Anonymoushttps://www.blogger.com/profile/04663893235158807212noreply@blogger.comtag:blogger.com,1999:blog-4717269872457503530.post-88733985342327734772013-01-12T00:37:13.073-05:002013-01-12T00:37:13.073-05:00Can the RPi clear the screen, or are you disconnec...Can the RPi clear the screen, or are you disconnecting it and shaking in the traditional manner?<br /><br />Also, any plans to expose a serial port from the RPi and hook it up to some system expecting to drive a plotter?smjhttps://www.blogger.com/profile/12568762694250042241noreply@blogger.com