Show Posts
Pages: [1]
1  Using Arduino / LEDs and Multiplexing / Driving an RGB LED strip w/ TM1803 chipset on: May 09, 2012, 09:41:58 am
Hi All,

I am new to Arduino and programming, but am enjoying the great user community and support! I am using an Arduino Uno development board and am trying to interface a RGB LED strip controlled by a TM1803 control circuit to it.

The TM1803 uses a 1-wire interface to communicate with the Arduino. According to the TM1803's data sheet, I need to create a series of pulses to represent a High, Low and Reset signal.

To represent a High signal the TM1803 expects to see a signal with a period of 2.04uS and a duty cycle of 66%

To represent a Low signal the TM1803 expects to see a signal with a period of 2.04uS and a duty cycle of 33%

To represent a Reset signal the TM1803 expects to see a Low for 24uS

From how I understand the TM1803 works is that one TM1803 controls a single section of the LED strip which contains three RGB LED's. Each LED in this section has 8-bit resolution, so 8 x 3 = 24-bits per TM1803 controller. Once the 24-bits have been shifted into the TM1803 the output is latched and shifted out to the next TM1803. This output remains latched until a Reset signal is sent. 

Goal: Develop a function that I could send a Reset signal and a function that can set a 24-bit Color Value, and set the number of sections to shift out the Color Value out to.

Ex:    resetRGB();
Ex:    setRGB(color,setctions);

If anyone would have any advice on where to start or code examples to post I would be very much appreciated!

Attached is the data sheet for the TM1803
2  Community / Exhibition / Gallery / Re: Made my own TwitterClient and I think it's better than the example one on: May 02, 2012, 01:03:20 pm
Hello JO3RI,

I am working on a project that also uses a twitter feed for controlling hardware although I am trying to also use WiFi by means of this product:

http://diysandbox.com/our-products/arduino/platinum

I am having trouble however porting your code over to the wifi libraries.

Below is the modified code:

Code:
#include <SPI.h>
#include <Wirefree.h>
#include <WifiClient.h>
#include <TextFinder.h>

WIFI_PROFILE w_prof = { "R_Squared_WiFi",       /* SSID */
                        "0123456789" ,          /* WPA/WPA2 passphrase */
                        NULL,                   /* Set for DHCP */
                        NULL,                   /* Set for DHCP */
                        NULL                    /* Set for DHCP */
                      };

String TwitterName ="EETSeniorDesign";
char tweet[140];
String SearchString ="<title>";
byte charsize;
char serverName[] = "api.twitter.com";

WifiClient client(serverName, 80);

void parseRxData(String data)
{
}

void setup()
{
  // initialize serial:
  Serial.begin(9600);
 
  // start wifi
  Wireless.begin(&w_prof, &parseRxData);
 
  // connect to twitter:
  delay(3000);
}

void loop()

  Serial.println("debug - void loop()");  //debug
 
  if (client.connect());
  {
    Serial.println("debug - client.connect() = true");  //debug
 
    TextFinder finder( client,2 );
 
    client.print("GET /1/statuses/user_timeline.rss?screen_name=");   
    client.print(TwitterName);
    client.print("&count=1 HTTP/1.1");
    client.println("HOST: api.twitter.com");
    client.println();
 
    Serial.println("debug - HTTP Request Sent");  //debug
 
    while (client.connect())
    {   
      Serial.println("debug - client.connect() = true");  //debug
     
      if (client.available())
      {
        Serial.println("debug - client.available() = true");  //debug
       
        SearchString = SearchString + TwitterName + ": ";
        charsize = SearchString.length() + 1;
        char StartHere[charsize];
        char EndHere[] = "</title>";
        SearchString.toCharArray(StartHere,charsize);
        if((finder.find("<item>")&&(finder.getString(StartHere,EndHere,tweet,140)!=0)))
        Serial.println(tweet);
        break;
      }   
      else
      {
        Serial.println("debug - client.available() = false");  //debug
      }
    }
    delay(1);
    client.stop();
    Serial.println("debug - client.stop()");  //debug
  }

delay(60000);
Serial.println("debug - delay (600000)");  //debug
}

This is the response I get from the serial output:

Quote
AT+WWPA=0123456789
AT+WA=R_Squared_WiFi
AT+NDHCP=1
debug - void loop()
AT+NCTCP=api.twitter.com,80
debug - client.connect() = true
debug - HTTP Request Sent
AT+NCTCP=api.twitter.com,80
debug - client.stop()
debug - delay (600000)

Would you or anyone else have any suggestions?
3  Using Arduino / Networking, Protocols, and Devices / Re: Twitter Interface Using Arduino Tweet on: April 17, 2012, 01:35:45 pm
Hello,

I am starting the same project and am having trouble modifying the twitter libraries to even get a connection. Would it be possible for you to post your modifications?

Where you able to resolve your stated problem?

Many Thanks,

Randon   
Pages: [1]