This project was built to learn about streaming data over USB from a Trinket, which is accomplished using Adafruit's bit-banging USB serial library since it doesn't support "actual" serial connectivity.
For the client connection, I didn't really care about sending any data - only receiving it - so I cut out any USB writes and just listened to USB reads. If you'd like to see the barebones Python logic for reading data over USB, I've created a GitHub Gist that has a base template.
Of course using USB means you can't use one entire side of the Trinket, since it is dedicated to power/ground/USB communication. That gives you perhaps one analog input and two analog outputs.
Bear in mind that the nails will eventually dissolve away, and if they are galvanized they may leak chromium into the soil. Which would be bad.