here is about a 7 days of previous work that I have completed located within this drop box link. I lost the posts on them as I had written up a text file to go with each explaining what I coded them in so that other people could understand but they were corrupted and are unusable now.
https://www.dropbox.com/sh/4jexdqe7tsw8tal/1kTDOMEill
Thursday, 30 January 2014
Wednesday, 29 January 2014
day 28
I have begin trying to make a program that would be able to take input from the microcontroller and be able interface it so that it is able to take the information and use it in a program through my computer. As of recently I have been able to take input from the computer and send it to the mictocontroller and make i do things based on that through sending an ascii character to the device through a text based serial commuication. Though recently I have been working making an GUI for the computer so that I would be able to send the information through to the device and be able to read the information that is sent back. The program is written in Java script and is pretty straight forward to understand as well as use.
import processing.serial.*;
//gives Serial commands
Serial myPort;
//create Serial port
void setup()
{
String portName = Serial.list()[0];
myPort = new Serial(this,portName, 9600);
//Searches on 9600 bod for serial
}
void draw()
{
if(keyPressed)
{
if(key=='b' || key=='B')
{
fill(0);
//0 means black
myPort.write(98);
//98 is B lowercase
delay (5);
}
if(key=='g'||key=='G')
{
fill(0);
myPort.write(103);
delay(5);
}
}
else
{
fill (255);
//255 means White
}
rect(25,25,50,50);
}
import processing.serial.*;
//gives Serial commands
Serial myPort;
//create Serial port
void setup()
{
String portName = Serial.list()[0];
myPort = new Serial(this,portName, 9600);
//Searches on 9600 bod for serial
}
void draw()
{
if(keyPressed)
{
if(key=='b' || key=='B')
{
fill(0);
//0 means black
myPort.write(98);
//98 is B lowercase
delay (5);
}
if(key=='g'||key=='G')
{
fill(0);
myPort.write(103);
delay(5);
}
}
else
{
fill (255);
//255 means White
}
rect(25,25,50,50);
}
day 27
this was working on repairing a laptop that was brought in to me from a friend. What had happened was a file had changed the root directory and infected the main files. What I had to do was backdoor it using hirens boot CD and extract the files that they needed from the computer to a secure drive then scan them for any trace of the virus. I then wiped the laptop several times via boot nuker then reinstalled windows 7 onto the laptop its self.
Day 26
Today I stumbled into a problem with using C for the mictocotroller. The code is supposed to loop through an stop at a specific point. I have tried to use if and else statements on their own though it didnt work very well.
if (x == "test")
{
digitalWrite(led, HIGH);
}
else
{
digitalWrite(led, LOW);
}
the solution was to create it as a counter, using x++ as the solution to it.
x++;
if (x %% 2)
{
digitalWrite(led, HIGH);
}
else
{
digitalWrite(led, LOW);
}
if (x == "test")
{
digitalWrite(led, HIGH);
}
else
{
digitalWrite(led, LOW);
}
the solution was to create it as a counter, using x++ as the solution to it.
x++;
if (x %% 2)
{
digitalWrite(led, HIGH);
}
else
{
digitalWrite(led, LOW);
}
Saturday, 11 January 2014
day 25
I was working with 7 and 10 segment LED displays for my arduino, 7 segments are for making numbers any number from 0-9 with a single one and any number from 00-99 with two of them. They are controlled actually quite complexly. I found out that the ones that I have are actually reversed compared to others. MOST of them have common negative and then you just send a signal to the others to make it able to light up but this one had a common negative meaning that IF I wanted to make it work I had to hook power to the common positive and then control output through the microcontroller which it isnt meant to normally do. There is then the 10 segment display which is very simple it has 10 LED's in a row and I can control which light up, when they do it and for how long. Making it very good for displaying power levels.
day 24
I went down to a store in langley called SMI electronics which has MANY different electronic supplies, cables, computers, switches, you name it and they have it. Making it the goto place for getting stuff for my arduino kit. The main thing that I bought was a new breadboard that was 6 times the size of my old one as it was getting way to small to make the things that I was wanting to. I bought a few switches and a few other things.
Day 23
I have recently begun working with my Arduino microcontroller kit and been figuring out how it all works. I made the simple blinking LED sketch and did that did that for a while then moved onto more advanced things like making it blink at different speeds and making the LED blink at different brightnesses which is actually more challenging than it looks.
Subscribe to:
Posts (Atom)