普通视图

Received before yesterday

Setting Raspberry Pi’s Date and Time

2024年4月23日 12:00

You have finally connected your Raspberry Pi to the internet and are ready to start your project. You are then hit with an error telling you that you can’t access the web. It turns out that your Pi is set to a different year in a different timezone. This is how you manually change your date and time so that you can access the internet.

The first thing you want to do is open up your terminal. The command: man date, will give you all the information you need to work with anything relating to the date and time of a Raspberry Pi.

Don’t worry, you won’t be forced to read through all of that documentation.

The following code will allow you to set the time to whatever you desire, ideally the current time. Follow this format:

sudo date -s "WeekDay Month NumericDay hour:minute:second timezone year"

Do not forget to put quotations before the day of the week and after the year. The time also needs to be based off a 24 hour clock so that am and pm are accurate.

Wait a few seconds and the clock and calendar in the corner of your screen should update.

If your timezone is still wrong, follow the next steps. If your timezone is accurate, you are good to go.

Go back to the terminal and enter:

sudo raspi-config

This will bring you to the Raspberry Pi Software Configuration Tool. Select option 5 Localisation Options

Select option L2 Timezone.

This Pi is being setup for usage at the University of Virginia, so the timezone will be set to reflect that. If you live in a different timezone select your corresponding locations.

Select the America Geographic area.

Charlottesville is on the east coast so select New York as the Time Zone.

Hit finish.

Congrats!!! You have set up your Raspberry Pi to its accurate date and time. You should be able to freely access the web now.

Beep-boop: littleBits Droid Inventor

2024年3月22日 12:00

Have you ever wanted to build your own astromech droid? Now you can! This step-by-step guide on building the littleBits Star Wars Droid Inventor Kit will allow you to have your own screaming astromech droid. The box will say download the DroidInventor app for instructions to build your own droid, but this app no longer exists. With littleBits acquisition by Sphero, support for this kit no longer exists. This will provide a guide on how to build the droid and be able to drive it.

There are three main sections of the droid: the electronics, the chassis, and the frame. We will begin with the electronics.

Electronics

  • Connect the adapter to the 9 volt battery and plug the adapter into the port on the dark blue component labeled P4 Power

  • Attach the P4 Power module to the control hub, on the side with a singular adapter

  • There will be a longer connector with Wire In and Wire Out labels. The W1 Wire Out connector will plug into the top port (1) on the control hub and the W1 Wire Out connector will plug into the pink component labeled Proximity Sensor

  • Connect the component labeled 011 Servo to the middle connector (2) of the control hub and the component labeled 025 dc motor to the bottom connector (3) of the control hub. This setup will make mounting the electronics to the chassis easier.

Chassis

  • The box like section of the chassis has a rectangular opening, this slots into the other section of the chassis

  • The gear has a larger side and a smaller side that corresponds with the openings on the chassis. Secure the gear with the axle, then secure the wheels on the ends of the axle.

  • Attach the small wheel to the peg on the servo and connect the cover shown below to the top of the servo, this is how it will mount to the rest of the chassis.

  • Attach the battery holder to the battery, this is how the battery will mount to the chassis.

  • Attach the dc motor to the bottom of the chassis, make sure the gears on the motor mesh with the gears on the chassis, this will power the wheels. Attach the servo to the front of the chassis, there will be a section with four holes for the servo mount to attach to, this will allow the droid to turn.

  • Mount the battery to the back of the chassis and the rest of the electronics to the front, this will allow the lights to shine through the front like a real astromech droid. It also just looks cooler with the electronics visible in the front

Frame

  • Carefully attach the bottom of the frame to the bottom of the chassis. There is a locking mechanism that will secure it. Make sure to avoid clamping any cables when attaching the frame.

  • Slot the main section of the frame over the chassis, connect it to the bottom section of the frame

  • Attach the arms to the frame. They will be labeled with L and R. L goes into L and R goes into R. Make sure there is clearance between the bottom sections of the arms and the wheels, so the wheels can spin unimpeded.

  • Once you put the head on, you will have completed the astromech droid. You can put stickers on it now to give it more character. It comes with red, white and blue stickers. I ended up using straight blue because R2D2 is canonically blue.

Note: I have no idea where to put these parts, the box came with no mounting mechanism for them.

Driving

Now that it’s built, all that’s left is to drive it. Again, the app that was meant to control the astromech droid no longer exists. Luckily, I was able to find a program that deals with this issue, to an extent. Meetar on github has created an open source program to drive the droid. Once the files are downloaded, run the bluetoothtest.html file to see if your device can sync to the droid (I used my laptop). If successful, begin testing the different interface versions to see which one works best for you, personally I found interface6 to be the most reliable. Some of the other iterations would not let me drive backwards.

This will allow you to drive the droid around and have it make various sounds. However, it seems without the official app a lot of functionality is no longer available. I was unable to get the proximity sensor to work, so the ability of the droid to learn and navigate a room on its own has been lost with the app.

❌