Posts

Showing posts with the label Arduino

Week 13.2 - A3 Finalising Code

Image
 Yikes! lets begin with that. It has been one hell of a ride with this code. For most of the duration of A3 I have been trying to code infrared leds and transmitters...NOT BEAM BREAKERS. It was only until last week Thursday during our tech workshops that I was finally introduced to them. Thank God for that, I was about to pull my hair-that you can't seen under my hijab-out. The Beam breakers are amazing, whoever designed them is honestly my hero. While it has taken me a couple hours to get the code, (and its still not perfect 100%) they have taken my code to not working to everything is working as it should with the expection of the display screen that is clearing at the moment. But the detection is just amazin and how accurate it is and how each stage correlates with each other. It's late and I'm happy.  The video below demonstrates the working interactions, with a couple things missing (such as buttons) for how my design will monitor the bag and inform the user through li...

Week 13.1 - A3 Flowchart

Image
Once the video was complete, and while coding is still being adjusted and modified, I have made a draft flowchart that while it covers majority of the interactions, I feel, depending on what the end code is, is missing a couple directions or options if that be the case. While the flowchart seems to cover both forward and backward pathways, there is one aspect (in the close up picture below) that I'm not 100% sure with at the moment - this mainly due to not finishing the code here but also the question that I've been asking my self is that if that reaches this point, 000 must be called for immediate assistance if the bag is empty, so how would my code call 000? And the answer, at least as I write this, is it won't. The design is a monitoring device that informs that user of whats happening below, it keeps them up to date. If it was to overflow and backlog, I hace recently (today) installed a buzzer alarm to notify other people that this individual needs assistance. I guess t...

Week 12.4 - A3 Coding

 A3 Coding - Wasn't on the right track but now I hopefully am Coding for this has been a nightmare. The good news is that I finally got the LED light working, where I can turn it on and off with the remote thanks to the help of another collegue. The video below shows that achivement. The bad news is that instead of trying to use the infrared led senders and transmitters that I have, I have been strongly advised to switch and insteead buy beam breakers, which I found and orderded today cause trusty Jaycar don't have it. Though good news as well is that the display screen works! The video below shows me using code from this website:  https://lastminuteengineers.com/oled-display-arduino-tutorial/ The website was a massive help and explained each component of the code, so I understood it and know how to covert and adapt what I need into my final A3 code.

Mid-Break.3 - A3 Coding for IR receiver

Image
Coding for A3 - IR The coding for A3 is quite fustrating. I'm not sure what I'm doing is correct and since its infared its hard to see what's working or not. Without the serial monitor, I would not be able to tell if it works. (The code I have been working on for this post was from https://www.dfrobot.com/blog-648.html (project 14)) Which is a good thing I guess, as it would tick the subtle box, with nothing showing... As you can see in the video below, the demonstration by itself only shows me clicking the remote but there is no visual que/output that can be seen/ That is until you look at the monitor on the computer where you can see that something is happening on an invisible line. Below are also some pictures of my simple set up. I sadly coudn't get the LED to work with this code.

A3 Initial Concepts - Going back

Image
In preparation for the A3 interactive product, my design team met up to discuss our initial concepts that are part of our focus area; preventing injuries. I chose the initial concept 3, but thought I should look back as I fear it may be to complex for me. My initial concepts focused on the bathroom and some on the kitchen.  My first initial concept aims to prevent burn injuries in the bathroom, especially when having a shower or path, and not being able to feel the temperature etc. The second initial concept was for reachability in the kitchen. A device that pushes spices or something in the cupboard to the forefront. (Though it could go too far and be the cause of injuries instead of preventing it) The third initial concept is for the bathroom, involving the Catheter bag and the colostomy bag. I've been looking at how to recreate the experience and prevent infections etc. The fourth initial concept is quick one, trying to help maintain hair...something that helps put the hair up. ...

Feedback, Attention & Status

Image
Feedback, attention and status From a previous class we were taught what the above mentioned are in relation to our arduinos. Feedback – objects immediate reaction to input Attention – object communicating with the user that there has been a state change Status – output that indicates the object current status They can be many different things, it just depends on what your inputs and outputs are and the interactions. The same experiences could be created using Arduino components, haptic motors, buzzers and LED’s Status is passive, attention is active When something goes wrong you might draw the users attention to something (hence active etc) Daily stack challenge using Arduino e.g. https://vimeo.com/29710376 Attention, the blinking light and display screen blocks Each block has weight, colour differentiates between each other How can you lead through the interaction in the simplest way? Knock knock project (simple calculator) https://vimeo.com/60773296 Getting...

Arduino Coding - Hall Effect Sensor

 My initial idea involved a RFDI chip but has since evolved and changed to using a hall effect sensor that does the same thing but is a lot easier to code.  The hall effect sensor used a magnetic to interact with, you simply tap it against and a red light flashes to notify you that it's connected. I have also coded the hall effect sensor so that when you tap against it, the warnings stop.  In the scenario with my idea, this means the hall effect sensor will be used as an overide. So parents can basically have a cookie anytime they want and control the childrens intake. The video below, shows how the hall effect sensor will be used in the scenario;

Arduino Coding - Potentiometer

 After talking to a Tutor for advise on my code/arduino set up, there was a problem where the buzzer continues to make noise when it's not supposed to.  To fix this, it was suggested that we use a potentiometer instead of a tilt switch to see if that would change or fix things. As you can see, in the video, this was not the case. The noise still continued to happen but admittedly it was a lot easier to turn on, in my Tutor's word, the potentiometer has more stability than the tilt switch. This gives me something to think about as, while it's more stable, the interaction isn't as physical as the tilt switch, which means I might need to rethink how I will integrate it into my design.

Arduino Coding - Ultrasonic Experiment x2

My second experiment with the ultrasonic sensor went a lot better than I thought it would. This tutorial came from the Arduino website:  Arduino Distance Detector With a Buzzer and LED's In the below video, we can actually see an interaction where the closer you are to the sensor the higher you here the buzz, with different warning sounds as well as the lights that show three warnings! 

Arduino Coding - Tilt Switch

For my A1 tech task with the cookie, I'm looking at using the tilt switch as the turn on and off. Its the start of the interaction. To turn it the cookie jar on, you have to tilt the jar and that's when the sensor will be turned on. I have done a previous experiement with the tilit sensor, however, in the video it was used to detect vibration and was not the main instrument. In the below, video you can see how I have used the tilt switch sensor as an input that you must interact with in order to one, start the system, and two, to turn the LED light on in order to know that it's turned on. I am very pleased with the result of the tilt switch and now just need to join it with the ultrasonic sensor for my code. I hope it works!

Arduino Coding - Trying Ultrasonic

My first experiment using the ultrasonic, didn't actually go that well... Admittedly, it could be my fault but I followed the directions to a T, crossed my t's and dotted my i's etc.  I followed the tutorial from this website:  https://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/ But this happened: In the video, as you can see, I ended up removing the black cable and it seemed to work or at least respond...ish. This example didn't really help with my understanding nor did it help with my A1 assessment. 

Ultrasonic not PIR

Image
Ultrasonic for the Win  To detect motion in order to set off the warning 'growls', I have looked at using a PIR sensor.  While I can use it, I have been advised by the world's best tutor, i.e. James (See James I am a nice person!) that it's not the best sensor to use and would basically be a massive pain trying to code and deal with its delicate sensibilities. To instead use an ultrasonic sensor to detect motion etc. They are easier to code and will get the job just as good. Basically, the moral of the post, is to avoid PIR and always listen to your Tutors, they know what's best!

Arduino Coding - Tech W5

Image
 In class, I wanted to explore the tilt switch sensor as I want to use it in my design, but not sure how to work it.  I used the project 8 example, from DFRobot, the Vibration sensor, to introduce myself to how it works. The video demonstrated a good way to use the tilt switch and the LED light to show its been turned on or off. The code needs working on to make it easier for me. I need to find more examples of the tilt switch sensor being used.

Arduino Coding - Tech W4

In our week 4 tech workshop, we were provided with advice and how best to test your code and your inputs as a result.  For auto formatting – Ctrl + T Signal testing, wiring input > need more than just power, basic circuit in slides Multimeter > can test if circuit is complete Serial monitor to display serial functions Serial print to check if its running correctly and can use to get range etc Next step to test what’s happening Test each input at a time, set up one and test that so you know its working, so you can start figuring out what’s wrong Versioning code extremely important Using fault testing tools to detect things Start from base and then do trial and error to tweak the code already there for your purpose   It's important to note that our wiring diagram must be as good as perfect or our code won’t work without it. A trigger, what a switch could be…could use time of day as an event…and they have a trigger event system To code and figure things out, we were a...

Ardunio Coding - Tech W3

Using the same example from previous exercises in Tech Workshops, the fading light example, I tried to re-code it using two different inputs.  The first was with a temperature sensor that turned the light on when it ranged between 50 to 55. The second attempt was using the same input with the potentiometer, but coding so that when the potentiometer is turned within a certian range the light will turn on.  I tried to create proximations to make this work. It was through the serial printer that we checked that it was possible as it depended on the room temperature.                                                         The second exercise was to try and find a differnt piece of code and use different sensors to test. In the following videos I followed an example to make the fan work. However, I found an issue w...

Arduino Coding - Tech W2

Image
In our second workshop for Arduino, it was about the coding side of things and how to correctly write it as well as the different codes and functions that can be used. Variables and constants Void setup(), void loop() x() If, else if, while, for statements Always comment your code!!! No exceptions // comments start with ‘//’ You can write anything in a comm e nt {} are not () are not [] Commands need to be closed with ‘;’ A nalog (wave) vs digital (squared wave) Analog inputs, analog inputs vary from 0-1023 E.g. analogRead(potPin); //analog reads the potentiometer position D igital inputs/outputs has only two states D igital inputs/outputs: 0-1,LOW-HIGH digitalRead(buttonPin); //reads the button state digitalWrite(ledPin, HIGH); //turns the LED on D igital PMW outputs; 0-255 analogWrite(ledPin, 200); //turns the LED on a specific brightness General order of code //constant integers (whole numbers) const int name = x, //this creates an integer called ‘name’ with a constant value of ‘x’ ...

First Arduino Experiment

Image
In our first Tech workshop, we were officially introduced to Arduino. What? Open source electronics Why? User interaction to test interactions and receive feedback Allows hands on interaction and be able to give an electric engineer for e.g. an idea down the track About taking more steps to build your product Can do temperature example, take in one input like temperature Project examples on Arduino website like colour detection Another e.g. window painting robot There’s no limit to what you can do with Arduino Exercise encouragement via automated BB gun Can use it for a lot of medical solutions, e.g. fall detection Carls’ project – Rowing Glove, worked with injury prevention and rehabilitation during rowing with mobility tracking James project – CPR Training device – guides users through CPR using basic inputs and outputs Board Basics -  Arduino Setup Power and ground pins (3.3V, 5V GND GND Vin) Important to know which volts your project runs on, majority is 5V Eception3.3V Recomme...