Introduction: A Social Printer for Special People
A few months ago, I made special Router for my grandpa who was once a tough guy and now suffering for AD (Alzheimer’s disease), luckily I’ve got more than 24k views and 236 Favorites and many people love it. This time I still appeal for doing some special things for special people. Today I’d like to share my latest project to you, a social artifact for special people just like my grandpa.
If a person never use the Internet, how to let him know how you getting on with your life. So I made this device for my grandpa into my life. Every time when I update my SNS, the device will print it out. So even my grandpa don’t have a SNS account, he still can access mine.
Step 1: What Do We Need
Step 2: Wiring
Now, we should connect the Grove Modules to the Grove Breakout for Linkit Smart 7688 Duo just as below picture shows.
But the Embedded Thermal Printer operating voltage is 5V, the Grove interface on the Grove Breakout board is only 3.3V, so we need to do something change on the cable and connect the power cable to the Debug Port on the Grove Breakout for Linkit Smart 7688 Duo
Embedded Thermal Printer D4 port on Grove Breakout
Step 3: Setup the Linkit Smart 7688 Duo
The software work of the social artifact consists of 2 parts, the code running on Arduino side and the python script running on the LinkIt Smart 7688 side.
I assume you have been familiar with Linkit Smart 7688 Duo, if not, please clickhere to get started. , then go to the MT7688 terminal by SSH or serial.
Modify the configure file to change MT7688 into station mode and connect to the internet.
Change the configure file as below shows.
Change the ssid and key to your own on the red box as the picture shows.
We use the yunbridge for communicating between MT7688 and ATmega32U4, so, enable the yunbridge.
> uci set yunbridge.config.disabled='0' > uci commit
To have a try ping a website to ensure your LinkIt Smart 7688 Duo have connected the internet well.
Step 4: Upload the Arduino Code
1. Download demo code at https://github.com/Lee-Kevin/SNS_Spider/tree/master/Arduino_Code
2. Click “Download zip” button on right side of webpage to download all codes.
3. Decompress the downloaded zip files to“C:\Users\Administrator\Documents\Arduino\” and remove “-master” in decompressed file name.
4. Launch Arduino IDE.
5. Click Sketch>Add file to add SNS_Spider_Arduino.ino file from“C:\Users\Administrator\Documents\Arduino\SNS_Spider\Arduino_Code\SNS_Spider_Arduino\”
6. Click Tools -> Board and select “Linkit Smart 7688 Duo” and chose the right port, as shown in the picture below.
7. Press CTRL +U to upload codes to your board. Wait a while, there will be saying “Done uploading”.
8. Congratulations, you have already completed the most of software work.
Step 5: Download the Code and Change It
First we should install the dependent package.
pip install requests pip install beautifulsoup4
Now, we have already install the requirements, download the code from github.
git clone https://github.com/Lee-Kevin/SNS_Spider
Navigate to SNS_Spider and you can find there’re one folder and some files. Arduino_Code is the code that should be run on Arduino, sns_spider.py is the Python code should to be run on Linkit Smart 7688. Now we edit the sns_spider.py and atomizer.py using vi editor.
cd SNS_Spider vi sns_spider.py
Open your favourite SNS, and copy the cookie as the below picture shows. You can get it from your web browser, for example Chrome, just press “Ctrl + Shift + I”, you can open the developers tools of Chrome, copy the cookie of your SNS.
Change the cookie to yourself and change the URL to your own SNS.
Step 6: Setup the The Startup Script
Navigate to /root/SNS_Spider
cd ~ & cd /root/SNS_Spider/
Then setting the startup script.
chmod +x spider & mv spider /etc/init.d etc/init.d/spider enable
/etc/init.d/spider start &
And then reboot the router.
When the router is reboot done, the app will check your SNS once every minute, you have done all the software work.
Step 7: Prepare the Structural Components
What we need:
- M3*5+6 Stud —— 3 PCS
- M3*6 Screws —— 3 PCS
- M3 Nut —— 3 PCS
- Screwdriver —— 1 PCS
Step 8: Make a 3D Print Skeleton
Now we are going to make a 3D print shell for the printer and hardware. Download the stl file attached.
Do not need 100% fill rate, fill rate of about 40% is sufficient, Don't forget to remove the burrs with your knife after print complete.
Step 9: Fix Structure in Hardware
7688 expansion board has three holes, mounting studs and nuts on the holes. This step can be completed just by hand. Recommended hold the nut with your fingers, then rotate the studs.
Step 10: Fix Hardware on the Skeleton
Screw the hardware part fixed to the frame, tips: three screws do not tighten one by one, put each screw is screwed in, and then tighten.
Step 11: Fix the Printer on Skeleton
Note, Please pass the cables across the skeleton, then connect to printer. After that, fix the printer in the skeleton.
Step 12: The Result
In this project I spider the weibo (a famous SNS in China) of my friends Lambor, and when he update his SNS, the printer will print it out.
Of course you can replace the SNS to your favourite ones, the principle of realization is the same.
Step 13: Make. Invent. Do.
This project is made as an Open Source Project. It's a starting point. Let your creativity go wild with the mechanical, electrical and software design. Make the demo your own. Decorate it. Improve the work. No matter what, write a recipe about it.
To share and progress together.
We have a be nice policy.
Please be positive and constructive.