Quote of AWESOMENESS: “The function of leadership is to produce more leaders, not more followers” ~ Ralph Leader
Functions are so useful and cool at the same time and right now I’m going to teach just how to make one!
But, before we go there, what exactly is a function? It’s somewhat like a pre-made command that you get to customize yourself. For example, you wanted to make five circles, imagine you would have to make each circle repeating how big you wanted it to be, the color, locations, and others. But, if you had a function, you would make it so much simpler in just adding the code and copy-pasting the function.
Here’s the code for a function:
[remember: WHITESPACE is very important in Python]
# This hastag is a comment and won't affect the code# We start making function by defining it with the word def# The thing written inside the parenthesis is called the argument# Remember to put the colon then the indentation will be proper, toodef list(alist):
# Here, I'm setting the variable a to number 0
a = 0
# This is a for-loop and the i just stands for index
for i in alist:
if i > 0:
a += 1
# Here is the actual function in action!
# Test section
mylist = [2,-4,5,-16,-20]
mylist2 = [2,6,8,-4]
mylist3 = [-5,-6,-7,-8,10]
This is just a simple example of what you can make of a function. Try it out!
This project is just extremely awesome and awe-spiring that I can’t wait for you guys to try it out!
We. Are. Going. To. Make. An. Arduino. Robot. Arm!!!!!! I know, I know super cool. Now, without further ado, let’s jump right into this project.
The following are what you will need to gather:
1x Arduino UNO Board
1x USB Cable Type A/B
2x 10k-Ohm Resistor
5x LED (A.K.A light-emitting diode, A.K.A miniature looking light bulb-ish)
5x 220 Ohm Resistor
20x Jumper Wires
First, let’s start by putting the potentiometers, the buttons, and the LED’s on our breadboard.
We will be placing 3 potentiometers, 2 buttons, and 5 LED’s. For your reference, the photo above can help. Yes, I did say 5 LED’s but I forgot to place the fifth LED in this photo, but you should put 5.
Here are some important basics to understand about an LED:
Cathode (-, shorter side)
Anode (+, longer side)
RESISTORS. Resistors. resistors.
Place five of your 220 Ohm Resistors on each of the Anodes (+) sides of each of your LED’s and the other end of the resistor to the negative side lane on your breadboard which we will later connect to the GND on your Arduino board. I’ve placed another photo above showing where I’ve placed my 220 Ohm Resistors.
Now, take both of your 10k-Ohm Resistors. You will have to place one side of your resistor to only one of the button’s leg. Do this for both buttons. Here is another picture but of the buttons and resistor placing.
We have finished placing all the resistors we will be needing in this project. You guys are doing an awesome job, btw!
This step will be really quick.
All we need to is get two jumper wires, first. Then, connect the Negative lane on your breadboard to your GND on your Arduino, and, the positive lane of on your breadboard to the 5V on your Arduino (you can find this right beside the GND, usually).
Done with this step. Great job!
For this step, you will be needing 5 of your jumper wires.
We will be connecting each of the LED’s on the breadboard onto the Arduino UNO board with your jumper wires.
Here is the first LED I connected. We will be connected the other leg (cathode, shorter side) of the LEDs to these numbers on the Arduino in order:
I will also be numbering the LEDs on the next photo so that it will be easier to know which we will be connecting to which.
We will connect:
LED 1 to 2 on the Arduino board
LED 2 to 3 on the Arduino board
LED 3 to 4 on the Arduino board
LED 4 to 7 on the Arduino board
LED 5 to 8 on the Arduino board
I know that wiring could be a tedious job but it’s okay because I know you can do it.
Wiring is very important because it connects. It works as that bridge that can help cars go back and forth and connect with other cities. If you have a bulb and a power source you can’t just put it beside each other or clink it together to light the bulb up (even that would be super cool if that’s how easy it was), you need to connect it through wires. So, let’s continue? Yes.
In this step, we will be wiring the buttons and the potentiometers.
Here in this photo I got two jumper wires and connected one end to the remaining unconnected leg of the buttons and connected the other side of the jumper wire to the positive (+) lane on the breadboard
That was easy, wasn’t it?
We are nearly done!
Let’s start wiring the potentiometers now.
For the potentiometer, it’s going to be slightly harder.
In this photo, I’ve connected 3 jumper wires to the right side of the potentiometer then connected the other end of the wire to the Negative lane of the breadboard (A.K.A GND).
And, then, I got 3 more wires and connected it to the left side of my potentiometer then connected the other end to the Positive Lane on the breadboard.
I’ve added the numbers on top of each potentiometer so that it’s easier to understand how to connect it to the Arduino.
As you may see on the picture to your left, I’ve added 3 white jumper wires to each of the middles of the potentiometers because we will connect this to the Arduino Board. Connect potentiometer 1 to the A0 on the Arduino UNO Board | Connect potentiometer 2 to the A1 on the Arduino UNO Board | Connect Potentiometer 3 to the A3 on the Arduino UNO Board.
In this step, grab two more jumper wires and connect both ends of the lanes on each side of the breadboard to each other. I used the black and red wire here.
You will need to connect the Negative lanes on each side to each other and the Positive lane on each side to each other.
Tada! Next step.
We are nearing the last of our steps. KEEP GOING!
We will add the servo motors to our breadboard and I put mine side by side to each other.
I connected three jumper wires each for three of my servos, meaning 9 jumper wires in total.
About servo motors in Arduino:
They usually have 3 plug pins (this is where I connected my jumper wires to)
Take a look at your servo motor. You will probably notice there are three colored wires. Each color represents 3 different things. The colors could actually be different sometimes but, as you see here, my colors are brown, red, and yellow.
The brown is the Ground/Negative (-)
The red is Positive (+) [This wire is usually located at the center of all the three wires]
The yellow is the Signal
Your wires on your servo motors might be different and you might be thinking “WHAT!?!?” but it’s okay (that’s what I thought too) here is how you can compare it to mine to find the similarities:
The Ground/Negative is usually | Black or Brown (in my case, it’s brown)
The Positive is always Red
The Signal can be either | Orange, Yellow, or White (in my case, it’s Yellow)
Awesome, let’s proceed.
These are what you need to connect with your Servos:
Connect each of the GND/Negative (Black or brown wire) on each of your servo motors to the positive lane on your breadboard (I used a white jumper wire, check the photo above for reference)
Connect each of the Positive (Red wire) on each of your servo motors to the negative lane on your breadboard (I used an orange jumper wire)
Lastly, connect each of the signals (Orange, Yellow, or white wire) of your servo motors to: 5, 6, and, 9 on your Arduino
This is our last time! Congratulations!!!
Connect your Arduino to your computer, fire up the Arduino app on your computer, copy paste the code below and press Upload.
Now, the challenge whether you choose to accept it or not is to build your own robot arm out of cardboard or you can check this —-> here which was made by Ryan Chan. Shoutout to him, btw. I hope you enjoyed this! I certainly had an awesome time and I hope you did, too!
You can teach others and share your awesome knowledge on building an arduino robot arm, I give some bragging rights.
We went back to the park to check out our traps and the mangroves. This time, we came at 8:00 am. The sun was shining through the trees and the birds were chirping beautifully. We arrived at our trap site.
Did we catch any?
From afar we could see the trap was touched by something. The trap was deactivated, but by what? We walked down the muddy stairs and to the traps. One was under a bridge and the other was near the oldest tree. We got both the traps and checked them. We were able to peek through a small hole which was created for inserting the paddle. We saw a claw and an antenna. It was possible that it was just a crab, but I guess we’ll find out soon.
We slowly lifted the opening for the creature to get out. On the other end of the trap, we put a container to catch it. We didn’t know exactly how the attitude of this animal was. We prepared to catch it as a mix of excitement and curiosity took over. We surrounded our trap and waited patiently. Silence filled the air. You could probably hear a leaf fall from a mile away.
But, fortunately for us, slowly it came out. It meaning the mud – lobster. We closed the lid of the cylindrical container. The mud – lobster pushed the cover and was trying to claw its way up. Very intelligent animals, indeed. It stopped moving when I ventured toward the container it was in. I put a small stick in front of its face to see what it would do. It didn’t move but after a few seconds, it loudly tried to clamp it with both its claws.
After capturing the mud – lobsters we went back to our second plot. We measured the starting of the plot and went further inland. We noticed there were a lot of Nypas on one of the mounds. We studied how the other mounds were surrounded by other kinds of plants. We were trying to measure the other mounds on the other side but it was covered with Acanthuses and Nypa Fruticans. After measuring all the mounds visible, we went back to the old tree.
Since we found some interesting things happening on this small piece of an island with the tree, we decided to make a plot there. The circumference of the whole island was 18 M 77. We wanted to look at the mud – lobster better so we decided to let it go for awhile. Scared it would run, we tied a small piece of string to its body creating a leash. It looked pretty funny, leashing a lobster. After realizing they are actually very, very slow we just unleashed them. We barricaded their surroundings with small logs and pieces of stick we found lying around, even an old boot. The biggest mud – lobster kept escaping and trying to get into one of the holes. They both stopped moving so we put them back into their containers.
We decided the best idea was to set up the traps in the same mound to check if more than one lobster lived in it. After setting up the traps, and nearly catching some mudskippers, we rested on top of one of the open bridges. This bridge wasn’t completely finished so the sides had no railings yet. We spotted a medium-sized jellyfish that got itself tangled up in the vines. It was beautiful and after few minutes untangled. The cool breeze was passing as I stared through the binoculars. I could barely make out the sweet songs of the birds anymore. The sun started to fall and the night was filled with partying crickets.
It’s been two hours since we left the trap and made a decision to check them out. We steadily made out our way with some flashlights. The ants started to appear everywhere, we could barely touch the railings for support. There was this one time when we found five ants all tearing up one ant. It was crazy. We did our nocturnal prospection for maybe 45 minutes. We went back and forth quietly trying to spot some mud – lobsters burrowing away. On our way out we closed all our lights and stared into the sky. All the stars were out, and the moon was like a shimmering diamond. We told each other stories and left back to go home.
We’ve finished freshening up and we were just laying around studying. We could see the flashes of lightning through our window. There was no after sound with the lightning in a long time. The silence in the air was occupied by the sound of the aircon. All of a sudden a loud boom came screaming through my ears. I jumped, accidentally pulling off my earphones with it. We all looked at each other, surprised. The ground shook for me, it felt so close by. It was past 9:00 pm so we decided to sleep already.
We reached our destination! Yay. We were assigned to drop our bags over at one of the tables before anything. I remember one of the first things that we were all told was about the eco toilet (which the place where you do the number 2). Btw, it was already lunch. Time to eatttt. The other kids went into the dining area already while I took a quick glimpse of the place. When I decided to join the rest I went up the small bamboo steps up to the dining area which was hovering over (with the aid of some concrete) the Moray Lagoon. The water was so clear and blue. Also, the reason to why the Lagoon had a Moray in it was because if you looked at the water you could see Moray Eels. They can look scary sometimes but also they made the water look lively if that makes sense.
As I stared at the dining area, I had no idea where to sit. Most of the tables were taken and I didn’t know where to sit. Also, I didn’t plan on sitting alone. And as I’ve mentioned before, most who came were with a relative or friend so they had a person to eat with.
I gathered my strength and decided to take a seat with a table that had 3 occupied seats. I said “hi” and we started to have a good conversation. In just a few minutes we all became friends.
While everyone finished their remaining lunch, one of the camp directors started introducing all the other camp members which we call ALs. Apparently, we were gonna be split up into four teams. Each team would be lead by one adult leader (or AL). All the AL’s each took turns in introducing themselves and their background about where they came from and why they’re in the camp. There was one scientist who came from Germany and who was going to teach us about fish and corals.
Also, we were told that for the answers that we got correct or for the behavior or actions that we did right we would get points for our teams. And of course, with being late or others our points could go down. Once we finished acquainting with our teams and AL’s, we all went out of the dining cabana and made a circle. Apparently, we were going to say our name and a dance. It went one way around the circle. When it reached my turn like everyone else, I shouted “LIBI!” and did this awkward dance move which everyone then shouted “LIBI!” and the same move. This was just a fun way to acquaint ourselves with everyone.
There are actually four cabanas for all the campers. Two are for the girls and two are for the boys. One of the main rules is that no boys allowed in the girl’s cabana and vise versa. There were about 5 girls in my cabana while there was about 7 in the other girl’s cabana.
When we finished preparing ourselves for swimming and trekking, we heard our call (KUUUUUWEEEEE (which is a bird call which came from one of the ALs)).
Most of the things you would hear (from the Camp Director) when all the campers gathered are “look at me if you could hear me” or “clap twice if you could hear me“. These were some of the ways to gather the attention when everyone was being loud.
Anyways, back to the learning center. We were briefed about the island and the different beaches and lagoons. At this point, there were a few questions in which you could earn a few points from. We were also briefed about first aid and other things to be aware of while we do our trek. We were ready. We were instructed to bring our snorkel, other gear (if you have any), waterproof bag (if you need for things you want to bring which you don’t want to get wet), water bottle, sunscreen and insect repellent. If you forgot to bring your snorkel gear (just like me ;D) don’t worry! You could rent a snorkel or any other gear at one of the gear stall area on the island. All you have to do is sign your name and Tadaaa!
Because each team had its separate color (in my case, color white), we had to wrap a different color per team on the snorkel. We then headed out team by team. While passing one of the bridges, we saw big sea urchins at the bottom. Wanna know why they were hanging out there? Well, above the bridge is a bat cave. And, the bat cave goes all the way down. The urchins liked the bat poop. Mmmm.
We passed by turtle beach and typhoon beach. And, after waiting for the other teams at some sort of bar (rehydrating ourselves with some water), we swam to the beach reaching one of the far rafts with the ALs and our teams.
Good thing for the tapes wrapped our snorkels when the others were still snorkeling you could still identify which ones were part of your team. We were shown the different corals and fishes. It seemed to explode with colors! It was beautiful.
We made our way back with a sunset trek. The sky was orange and the light slowly made its way down. Our night ended with some dinner and finally a bath! Even though it’s only one bucket per person, I agree that it’s a good amount to use. Here’s the tip, use the tabo twice to wash away the sand and wet your hair, then shampoo and soap, then another wash. Done! You’ll probably have some leftovers.
Just before sleeping, we all sat around in a circle at the dining area after pushing away the chairs and tables to the side. One of the ALs told us that this was our community building and that it will be one of the only times we’ll be doing it. As we sat down in a circle, we shared what we enjoyed throughout the day and something we liked to build in our community. On a sheet of Manila Paper, a circle was drawn. Inside the circle, we would throw out ideas we would like to have in our community, an example, trust or respect for others.
The picture above is the paper that we all made. In our community, we had the power of choice, the power of two feet, and the power of experts. Inside our community, we wrote down words we wanted for our Danjugan community. As you may see above, we wanted positivity, trust, support, friendship respect, understanding for each other in our Danjugan family.
After this, we went to our cabanas and slept. Well, the truth is I talked to my roommates (cabana mates) before sleeping. We were having a small debate whether or not we should leave the chips in the cabana. Laziness kinda went around and we decided to leave the food in the room.
We put our mosquito nets properly around our mattresses and finally slept. 😉