DDR 1st Mix Backgrounds

2 post in a week its a new record, for me anyway. Here are the backgrounds from Dance Dance Revolution 1st mix for the Playstation.

My favorite background in this sheet is “Strictly Business” which i believe is not in any of the other DDR background sheets i have done so far. Anyway i’ll try to have another up within a week, i’m not sure which one i will do yet though. Enjoy!

 

DDR 1st Mix
DDR 1st Mix Backgrounds

Arduino Remote Control Indoor Thermometer

Happy Holidays everyone, its been a while since my last post but i have been a bit busy over the past few months. I have been working on a Infrared remote control version of my indoor thermometer. It has a menu and displays the current temperature in Celsius, Fahrenheit, and Kelvin.

Before i go any further i need to credit   and more specifically his instructable  on IR remotes and Arduino. Also credit is due to Ken Shirriff for the original IR remote libraries located on Git Hub.

For this project i used the same set up as with my previously posted indoor thermometer with the added TSOP4838 IR receiver and IR remote. The first task was decoding the IR signals from the remote i had which was very easy thanks to the previously mentioned instructable. Each button sends out a different signal and once you have the signals its a matter of just coding what you want done when said signal is recognized.

Here is the code.

#include <IRremote.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(8,9,7,6,5,4);

float temp;
int tempPin = 0;
int IRpin = 11;
IRrecv irrecv(IRpin);
decode_results results;
boolean menu = true;
boolean submenu = true;

byte degree[8] = {
  0b01111,
  0b01001,
  0b01001,
  0b01111,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
};

byte downArrow[8] = {
  0b00000,
  0b00000,
  0b00000,
  0b00100,
  0b00100,
  0b10101,
  0b01110,
  0b00100,
};

byte upArrow[8] = {
  0b00100,
  0b01110,
  0b10101,
  0b00100,
  0b00100,
  0b00000,
  0b00000,
  0b00000,
};



void setup() {
  Serial.begin(9600);
  irrecv.enableIRIn(); //Start the receiver
  
  lcd.createChar(0, degree);
  lcd.createChar(1, downArrow);
  lcd.createChar(2, upArrow);
  lcd.begin(16, 2);
  
 
 
  
}

void loop()
{
  
  temp = analogRead(tempPin);
  float tempK = (((temp/1023) * 5)*100); //calculate Kelvin
  float tempF = (((tempK - 273.15)*1.8) + 32); //calculate Farenheit
  float tempC = (tempK - 273.15); //calculate Celsius

  if(irrecv.decode(&results))
    {
      irrecv.resume();
    }
    
  if (menu == true || results.value == 16738455) //menu page 1
    {
        menu = true;
        submenu = true;
        lcd.clear();
        lcd.print("1:Farenheit"); //menu
        lcd.setCursor(0,1);
        lcd.print("2:Kelvin");
        lcd.setCursor(15,1);
        lcd.write(byte(1));
        delay(1000);               
    }
    
  if (submenu == true && results.value == 16769055) //display menu page 2 by pressing the minus button while on menu page 1
    {
        menu = false;
        lcd.clear();
        lcd.print("3:Celsius");
        lcd.setCursor(15,0);
        lcd.write(byte(2));
        delay(1000);
    }
    
  if (submenu == true && menu == false && results.value == 16754775) //display menu page 1 by pressing the plus button while on menu page 2
    {
        lcd.clear();
        lcd.print("1:Farenheit"); //menu
        lcd.setCursor(0,1);
        lcd.print("2:Kelvin");
        lcd.setCursor(15,1);
        lcd.write(byte(1));
        delay(1000);      
    }
    
  if (results.value == 16724175)
    {
        submenu = false;
        menu = false;
        results.value = 0;
        Serial.println(tempF); //display Farenheit
        lcd.clear();
        lcd.print(tempF);
        lcd.write(byte(0));
        lcd.print("F");
        delay(1000);           
    }
    
  if (results.value == 16718055)
    {
        submenu = false;
        menu = false;
        results.value = 0;
        Serial.println(tempK); //display Kelvin
        lcd.clear();
        lcd.print(tempK);
        lcd.write(byte(0));
        lcd.print("K");
        delay(1000);
     }
     
  if (results.value == 16743045)
    {
        submenu = false;
        menu = false;
        results.value = 0;
        Serial.println(tempC); //display Ceslsius
        lcd.clear();
        lcd.print(tempC);
        lcd.write(byte(0));
        lcd.print("C");
        delay(1000);
    }
              

}

The remote i used which you can see in the pictures below is small with few options so i used the + & – button as up and down for the menu, and 1 2 & 3 to select which unit of measurement to display also i used the 0 button to go back to the menu.  Here are the pictures and schematic.

IR Indoor Thermometer
IR Indoor Thermometer

Just as a side note as to not confuse anyone in my pictures the potentiometer to adjust the temperature sensor has been removed. I had previously adjusted it to the correct setting and there was no need to leave it on.

If theres any questions about this or any of my other projects feel free to post them here. Hopefully ill post again before the new year but if not then Merry Christmas and Happy New Year to you all.

Text Encryption and Decryption python script

So i have been back to programming for a few weeks now. I started visiting some other languages before i decided whether i wanted to stay with python or not. Ultimately i decided to stick with python and i love it so. It had been a few months since i coded anything and needed to brush up on my python skills.

I wrote a few programs to get back into the flow of things, one of which i will post here. Its not that great or that hard to be honest. Its a simple text encryption and decryption script. Basically you give it a string of words or a word and it will encrypt it in whatever encryption method is chosen by the user and is available. It will then give you the encrypted message and also write the message to EncodedMessage.txt which will go into whatever folder the .py script is located.

Likewise for decryption it will ask you for a .txt file name which will need to be in the same folder as the .py script. Then it will give you the decrypted message and also write the message to DecodedMessage.txt which will be located in the same folder as the .py script.

I have a few more plans for this program like adding some more encryption methods and i would also like to add the functionality of the decryption function to allow the user to type in the encrypted message or reading it from the text file. At the moment it will just read it from a text file. Hopefully someone out there enjoys it or learns from it.

here is the git repository

Unproductive!!

So as of late i have been very unproductive. However i had a request to do a simple lyric music video for the song “Breathless” by All 4 One.  Its nothing special but its complete and can be found on youtube here.

Hopefully i do something more productive than that, or maybe someone out there will enjoy the video.

Till next time.

Secret of Mana 3D Perler Lighted Cube

For my latest project i wanted to do a Perler Cube. We have quite a perler collection here but nothing done in 3D. I thought a simple cube would be the easiest, then thought it would be even better to make it lighted. Here are some pics.
IMG_20150313_175108

IMG_20150313_175116

IMG_20150313_175125

IMG_20150313_175134

IMG_20150313_175558

PerlerCube1

For those that don’t know the sprites on the cube, they are the icons for the different schools of magic in the Super Nintendo game Secret of Mana. Included on the cube are Undine, Salamando, Shade, Gnome, and Sylphid.

Here is a link to the sprite sheet i used from Spriters Resource. For the illumination i used 1 9volt, 1 resistor, a switch,     and 2 ultra bright LED’s. This is actually a few weeks old project, currently I have been working on an android app which hopefully will be completed in the next week or two.  Until then!!

Arduino Indoor Thermometer Revised

I actually did this right after the amp but have been too busy to post it, or lazy. This is just a revised thermometer with the extra pot to zero in on the correct voltage to get an accurate temp reading.  If that is confusing then ill explain.

Here is the sketch i use to get the temp in Fahrenheit.

/* Indoor temperature with LM335Z temp sensor and being displayed
on a 16x2 LCD
by Travis Compton
2/6/15
*/

#include <LiquidCrystal.h>
LiquidCrystal lcd(8,9,7,6,5,4);

float temp;
int tempPin = 0;

byte degree[8] = {
  0b01111,
  0b01001,
  0b01001,
  0b01111,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
};



void setup() {
  Serial.begin(9600);
  
  lcd.createChar(0, degree);
  
  lcd.begin(16, 2);
  
}

void loop()
{
  
  temp = analogRead(tempPin);
  //calculate Kelvin
  float tempK = (((temp/1023) * 5)*100);
  //calculate Farenheit
  float tempF = (((tempK - 273.15)*1.8) + 32);
  
  Serial.println(tempF);
  lcd.clear();
  lcd.print(tempF);
  lcd.write(byte(0));
  lcd.print("F");
  delay(10000);
}

As you can see its quite simple. I first take the raw output from the temp sensor, convert it to Kelvin, then convert it to Fahrenheit. The reason we need that 3 pot is because of this formula in the sketch
tempK = (((temp/1023) * 5)*100)

We take the Analog read from the sensor and store it in temp, then divide that by 1023, then multiply that by 5, and lastly multiply that by 100 to get the temp in Kelvin. Whats important here is the multiply by 5 which is the voltage being fed to the sensor, which is not going to be a constant when using usb to power this project. If we where using a 9volt battery we would substitute the 5 for 9. So lets say we are only getting 4.6 volts from usb to power this project are temp will be off, here in lies the need for the 3 pot. Although with this method we would need another thermometer to verify are adjustments.

I hope i made this clear enough, if anyone has any questions just ask. Now for some pics.

Indoor thermometer w/ pot

And of course as always the fritzing schematic.

Indoor Temp with potentiometer_bb

Well thats it for this post. I have a lighted 3d cube im working on with some pictures from secret of mana on it, i would like to show this next, hopefully sometime this week.

Arduino Amp

For my next project i wanted to do a small amp. This project is very simple thanks to the LM386 IC.

OpAmp

Here are the parts required.

1 speaker

1 LM386

1 .1uf – .05uF Capacitor

1 220-250uF Electrolytic Capacitor

1 10 ohm resistor

1 10k Trimmer Potentiometer

1 audio plug based on how you wish to hook up your amp

For the audio plug as you can see in the picture i provided i used a 1/8th mono plug. You could use an RCA Plug or even a larger audio plug if you wanted based on need.  I would also like to point out that the schematic calls for a 10 ohm resistor, however I did not have a 10 ohm so i used the lowest i had which was a 220 ohm. A few days later i salvaged a 10 ohm resistor and stuck it in the breadboard. It is my opinion that the amp sounds better with the 220 than it did with the 10 ohm. The arduino is only being used to power the amp, you could just as easily use a 9 volt battery.

OpAmp_bb

Fritzing which is a wonderful program does not have many audio plug to choose from, this i why the black and red wire coming from pin 3 and pin 4 from the LM386 are not connected to anything in the breadboard schematic. But as you can see from my project picture these are running to my audio plug.