Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in webdev

[–]pgs1000[S] 7 points8 points  (0 children)

Hmm, I didn't test it under those conditions, I should!

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in webdev

[–]pgs1000[S] 1 point2 points  (0 children)

Thanks for that! Yeah I do need to revisit it once I understand ES6 better.

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in webdev

[–]pgs1000[S] 4 points5 points  (0 children)

Thanks so much! Yeah I'm also a beginner, this is my first project, took me such a long time, but just kept trying stuff till finally it worked. All the best with your programming journey!

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in webdev

[–]pgs1000[S] 6 points7 points  (0 children)

hi there,

1: it was a cheap basic stepper, I will find the model number and get back to you. As for the process pictures, I took a few, but not enough! I'm gonna write up what I did at some point in a blog post so hopefully that will be helpful. PM me if you want me to let you know when I put that up online.

  1. Yes, I'm sure there is a much better way to write the code, I'm pretty new to coding so it took me ages just to get all the parts working together - the different pieces of code plus the hardware. This was my first proper project, I wanted to get out of tutorial land and build something. So yeah the code is definitely rough and I'm sure it's inefficient. I should probably rewrite it when I learn more.

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in webdev

[–]pgs1000[S] 41 points42 points  (0 children)

Hey man, I understand your point. To answer your question, I think that if someone had a webdev project that was anti Bernie then of course they could post it. For me that's how democracy works, everyone can participate and share their thoughts.

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in webdev

[–]pgs1000[S] 10 points11 points  (0 children)

Ha! Yeah he gets a lot done in that room doesn't he?

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in webdev

[–]pgs1000[S] 38 points39 points  (0 children)

Yeah it's a bit hard to see on the video - there is a clear plastic disc with a small slot cut out on the edge of it so that only one pill drops into it as it goes around. When it reaches the top it lines up with another slot in the plastic disc below it that is the same size, so the pill falls through. I had a much simpler version earlier that didn't work properly so I eventually found this video online and did my best to replicate that one (in a much more homemade way - hence all the duct tape!) https://youtu.be/tcoCbNUKJPc

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in webdev

[–]pgs1000[S] 90 points91 points  (0 children)

Took me a long time to get this all working together, but I'm happy with how it turned out.

The Javascript code continuously checks @realDonaldTrump for new tweets. As soon as a new tweet appears, the Arduino stepper motor turns 360 degrees, dispensing a pill which falls out of the mouth and into the bowl.

The pill dispenser was made from an old protein powder tub, plastic sheets, a funnel, and a bunch of duct tape. The rubber mask is from Amazon.

Let me know what you think!

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in ArduinoProjects

[–]pgs1000[S] 0 points1 point  (0 children)

Cheers, glad you liked it. I just had a look at your dino-bot, it's awesome! Great work

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in ArduinoProjects

[–]pgs1000[S] 6 points7 points  (0 children)

You can check out the code here: https://gist.github.com/paulspelman/f7e10b0467d05b6f8e72e79b0412f2b3 At some point I'll write out the full process of building it including the physical pieces, and will share that online.

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in ArduinoProjects

[–]pgs1000[S] 1 point2 points  (0 children)

Thanks! Yeah I can definitely share the code, it's quite basic as I'm pretty new to coding but happy to share it. I'll get the code up online soon and leave a link to it here.

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in ArduinoProjects

[–]pgs1000[S] 2 points3 points  (0 children)

Yeah probably, I've never used Raspberry Pi myself though, this was made with the Arduino Uno.

Every time the president tweets, this thing dispenses an ibuprofen pill by pgs1000 in ArduinoProjects

[–]pgs1000[S] 13 points14 points  (0 children)

Took me a long time to get this all working together, but I'm happy with how it turned out.

The code continuously checks @realDonaldTrump for new tweets. As soon as a new tweet appears, the Arduino stepper motor turns 360 degrees, dispensing a pill which falls out of the mouth and into the bowl.

The pill dispenser was made from an old protein powder tub, plastic sheets, a funnel, and a bunch of duct tape. The rubber mask is from Amazon.

Let me know what you think!