Close
0%
0%

The Original Tweeting Trump Book

A book aimed at children that displays Donald Trump's live Twitter feed on an e-paper display

Public Chat
Similar projects worth following
This project is intended to be a collaborative research project that uses a conceptual design as a starting point.

Please don't hesitate to contact me if you'd like to be a contributor. Nobody will be refused!

The ultimate aim is to physically construct The Orginal Tweeting Trump Book in a participatory manner. All the components and code that have been uploaded to this project page are a result of my initial research on how to make this project physically possible. Project content can be changed by contributors as we work towards a final product.

Trying to achieve consensus for a change to the "Original Tweeting Trump Book" page might get messy but we will try anyway. If you'd like to start your own version of this project please do so. The more the merrier.

Contact me for an invite today!

The relationship between cognitive overload, social media and the omnipresence of Trump in the media seems deserving of some exploration. Trump’s propensity to frequently utter falsehoods has been well documented (Politico, 2019). The sheer volume, frequency and spontaneity of Trump’s lies makes reality hard to navigate while listening to him. It takes cognitive energy to distinguish reliable information from misinformation, distortions, pseudo facts and outright lies. The media has even begun to use the term “Trump Fatigue Syndrome” (Rennie Short, 2019).How can we ease our cognitive load when it comes to Trump’s words? 

One way to ease our cognitive load is to simply free ourselves from the context of non-Trump realities and start believing him, as Lamar Smith, (Chair of the House Science Committee) suggested in a 2017 speech to Congress. Lamar exclaimed: "Better to get your news directly from the President. In fact, it might be the only way to get the unvarnished truth”(House Science Committee Chairman Lamar Smith (R-Texas) suggests people bypass the media and get their news “directly from the president.,” 2017).

While it may be too difficult for some adults to be able to transition fully into to Trump’s reality, perhaps it is not too late to save our children from the psychological torment of trying to discern fact from fiction. Perhaps, IoT technology can help. The Tweeting Trump Children’s Book is aimed at parents who want to ensure their children do not have to contend with a disconcerting reality they can do little about. The book doesn’t open and contains no other information other than Donald Trump’s live Twitter feed displayed on an e-paper screen. In order to make things fun for children, the book jacket features a whimsical cartoon caricature of Trump’s iconic hair.

Note to parents: This book is most effective in the absence of all other books.

wHAT_rasppi_code.txt

Python code to display @realDonaldTrump latest tweet on e-ink screen via Raspberry Pi B3+

plain - 2.44 kB - 02/24/2020 at 22:06

Download

  • 1
    Step 1

    @realDonaldTrump Latest Twitter Feed on Inky WHAT E-Ink Display.

    Latest @realDonaldTrump Tweet using Raspberry Pi B3+ and inkywHAT e-ink display

    Instructions

    Requirements

    For this project you will need:



    • 3.  Use the free balenaEtcher to “flash” your zipped image onto a blank micro SD card. Slot your microSD card into your Pi Zero. 


    • 4. Plug your Raspberry Pi B3+ into a monitor and keyboard, and go through the steps of connecting your Pi B3+  to a WiFi network. Run updates as prompted.


    • 5. To use the Inky WHAT, you need to turn on the Pi’s I2C interface. To do this, from a command prompt type:
    • sudo raspi-config
    • Navigate  to I2C and press enter. Turn it ON. And then Finish.


    • 6.  Shut down your Pi and you can fit your Inky WHAT to the Pi’s GPIO board


    • 7. Boot the Pi back up, 


    • 8. Install the software for the Inky WHAT. From a command prompt type:
    • curl https://get.pimoroni.com/inky | bash
    • Follow the prompts all the way through. It can take a while to install this code so be patient.


    • 10. Go to  Twitter’s development site, you need to “Create an app” and give it a few details. They want to know a little about what you’re doing so fill in details as needed. We also really only need “Read” permission.
    • The important things that we need from here are details of the tokens. These need to kept secret, so don’t post them anywhere! Someone might use them to post as you if you’re not careful.
    • There are four long alphanumeric strings you need:
    • Consumer API key
    • Consumer API secret key
    • Access token
    • Access secret token
    • Save these somewhere safe, as you will need them in your Python code.
    • You also need to import a Twitter library into your Pi:
    • 11. Install the python-twitter library. From the command prompt type:
    • pip install python-twitter
    • Coding: 
    • The following code can be downloaded as a plain text file on the project page: https://cdn.hackaday.io/files/1671437151046112/wHAT_rasppi_code.txt
    • import sys,twitter
    • import datetime
    • api = twitter.Api()
    • # Populate your twitter API details below, replacing
    • # CONSUMER_KEY_HERE etc with your details from Twitter
    • consumer_key = ‘REDACTED, INSERT YOUR KEY HERE’
    • consumer_secret = ‘REDACTED, INSERT YOUR KEY HERE’
    • access_token_key = 'REDACTED, INSERT YOUR KEY HERE’'
    • access_token_secret = 'REDACTED, INSERT YOUR KEY HERE’'
    • api = twitter.Api(
    •     consumer_key=consumer_key,
    •     consumer_secret=consumer_secret,
    •     access_token_key=access_token_key,
    •     access_token_secret=access_token_secret
    • )
    • # Setting up the Inky WHAT
    • from inky import InkyWHAT
    • inky_display = InkyWHAT("black")
    • inky_display.set_border(inky_display.WHITE)
    • from PIL import Image, ImageFont, ImageDraw
    • img = Image.new("P", (inky_display.WIDTH, inky_display.HEIGHT))
    • draw = ImageDraw.Draw(img)
    • font = ImageFont.truetype("/home/pi/arial font/Arial.ttf", 18)
    • font_small = ImageFont.truetype("/home/pi/arial font/Arial.ttf", 14)
    • def reflow_tweet(quote, width, font):
    •     words = quote.split(" ")
    •     reflowed = ' '
    •     line_length = 0
    •     for i in range(len(words)):
    •         word = words[i] + " "
    •         word_length = font.getsize(word)[0]
    •         line_length += word_length
    •         if line_length < width:
    •             reflowed += word
    •         else:
    •             line_length = word_length
    •             reflowed = reflowed[:-1] + "\n " + word
    •     # reflowed = reflowed.rstrip() + '"'
    •     return reflowed
    • # I used the code from here - https://zone13.io/post/python-code-latest-tweet/
    • # to grab the most recent Tweet
    • # realDonaldTrump
    • def realDonaldTrump_tweet(realDonaldTrump):
    • statuses = api.GetUserTimeline(screen_name="realDonaldTrump")
    • return statuses[0].text
    • if __name__ == "__main__":
    • realDonaldTrump_latest_tweet = realDonaldTrump_tweet(sys.argv[1] if len(sys.argv) > 1 else 0)
    • reflowed_realDonaldTrump_latest_tweet = reflow_tweet(realDonaldTrump_latest_tweet, inky_display.WIDTH, font)
    • draw.text((0, 0), "@realDonaldTrump", inky_display.RED, font)
    • draw.text((0, 20), reflowed_realDonaldTrump_latest_tweet, inky_display.BLACK, font)
    • # The following just inserts the last updated time
    • # in the bottom right corner.
    • now = datetime.datetime.now()
    • tweet_update = "Updated: " + now.strftime("%d-%m-%y %H:%M")
    • draw.text((230,285), tweet_update, inky_display.RED, font_small)
    • # At this point we finally show the information
    • inky_display.set_image(img)
    • inky_display.show()

View all instructions

Enjoy this project?

Share

Discussions

bonexib214 wrote 05/19/2020 at 17:23 point

Hmm This is a book. I would like to read a review about it because there is no time to read anything other than legal books. You can say that law student deal with paperwork, so I'm completely involved in another. I can only read https://www.halt.org/how-a-law-student-deal-with-paperwork/ but I like to read just such articles. When they are very interesting and reveal big problems.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates