Jump to content

jelledebock

Members
  • Content Count

    16
  • Joined

  • Last visited

About jelledebock

  • Rank
    Member
  • Birthday 04/07/1993

Contact Methods

  • Website URL
    http://debockjelle.wordpress.com

Profile Information

  • Gender
    Male
  • Location
    Belgium
  • Interests
    cyclocross, mtb, electronics, programming, JAVA
  1. Hello sorry for my late reply, I had some exams to finish , but today I allowed myself a small break. @@RobG I've runned the code you provided, and it wasn't doing what it should. Then I tried to rewrite the assembly function of @@Rickta59 to fit the timing, but I kinda failed, and since I'm not familiar with debugging such functions (I don't have an oscilloscope so I can't find what I've coded wrongly). So I started to insert some NOP's in the existing code (well thought off course ) and to my surprise, it started displaying my coded colors more frequently, but for one or another reason it's still going wrong every 6 to 8 times. I made a small recording of it. I also uploaded code to bitbucket. https://www.youtube.com/watch?v=JuFlkP9TvSQ&spfreload=10 https://bitbucket.org/jelledebock/mainframe-files/src/6b7759e9947f86ef4a933dcc94ca326bf3755899/electronics/ws2811_hs.S?at=master
  2. I have ordered some ESP8266 modules and discovered you can flash the firmware in order to make it program over WiFi. This allows me to use the ESP8266 as a standalone IOT node. But to get the firmware on the ESP you need to flash it. As far as I can make out, the programming actually happens over RX TX and you need USB to Serial. As I'm not keen to buy stuff in double, I wonder if I can use the launchpad to program the ESP8266.I remember I've read somewhere that the BAUD rate is limited to 9600, but is it the MSP430 chip who's limiting it? f it's possible to do so, do I need to take some precautions (remove the MSP430 from the DIP, ...)?
  3. I calculated timings for the ws2812b and tried already to change the assembly to fit the ws2812b needs. The timings compared to the ws2811 are the following. ; --- High Speed Mode 800KHz ; WS2811 ; High / Low us High / Low cycles @ 16 MHz ; Zero: 0.25 / 1.00 4 / 16 ; One: 0.60 / 0.65 9 / 11 ; Reset: 0 / 50+ 0 / 800+ ; ; WS2812b ; High / Low us High / Low cycles @ 16 MHz ; Zero: 0.4 / 0.85 6.4 / 13.6 ; One: 0.8 / 0.45 12.8/ 7.2 ; Reset: 0 / 50+ 0 / 800+ I tried to change the assembly as I said before, I have little or no knowledge about assembly and just tried to reduce cycles at the low values and add some no-ops into the high value part. But I thing I'm not doing it right, mostly because of my limited asm knowledge. Is anybody willing to help me and take a look at the asm code. Maybe if somebody loves to help it's better to open a new thread with the code which's already there.
  4. Thanks! I bought them in assumption they we're WS2811's but as I'm comparing them with the 2812's they look more like these. I'm feeling kind of ashamed, I'm very sorry. Are there any Energia libraries available for the WS2812( b )? Could I possibly change the assembly of the WS2811 to fit the WS2812 timing? In fact I'd love to learn programming my MSP430 the non-energia way. As far as I looked that way of programming, you need to know the MSP430s architecture quite well. I have CCS on my laptop, so during one of my "exam-breaks" I can just load some of the code on my MSP430. Once again, realy sorry to make this error . EDIT On this forum they're talking about timing differences of the different types of chips ... https://forum.pjrc.com/threads/23877-WS2812B-compatible-with-OctoWS2811-library
  5. I was a bit busy with my exams but found some time to run the sample code and filmed what happened. I just modified the code a bit so that it used 15 leds. // blink_strip - ws2811 led strip blink example // 11-15-2012 Initial Version 0.1 #include <WS2811Driver.h> // 24 bits of color data stored GGRRBB const uint8_t leds0[] = { 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00, 0x00,0xff,0x00 }; // R,G,B,W const uint8_t leds1[] = { 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00 }; // 0,0,0,0 WS2811Driver ledStrip; // uses P1_7 as datapin connect to DIN on strip void setup(void) { ledStrip.setLEDCount(15); // setup for 4 leds on a strip ledStrip.begin(); // configure P1.7 for output } void loop() { ledStrip.write(leds0); // set leds to red delay(500); ledStrip.write(leds1,sizeof(leds1)); // turn off all 15 leds delay(500); } https://www.youtube.com/watch?v=4m9zJ1Ft3fk&spfreload=10 You can see clearly the led sometimes does what it's asked to, turn all red and then turn off. But it's like only able to do this one time and then it starts "freestyling" again. I'm far from an expert but my intuition tells me the msp430 isn't timing (or clocking) correctly, or can it be the ws2812 chips who are processing the signals wrongly? If the DCO of the MSP430 isn't function properly, is changing the microcontroller the only option?
  6. So if I change @@bobnova s code a bit it would become for my 15 led strip #include <WS2811Driver.h> byte leds0[45]; //15x3 per led WS2811Driver ledStrip; // uses P1_7 as datapin connect to DIN on strip void setup(void) { ledStrip.setLEDCount(15); // setup for 15 leds on a strip ledStrip.begin(); // configure P1.7 for output for (byte x = 0 ; x < 45 ; x++){ leds0[x] = 0; //turn all pixels off } } void loop() { //Modified the code, want to make the led strip one color ... red leds0[0] = 50; leds0[1] = 0; leds0[2] = 0; // for(byte x = 0; x <= 42 ; x+3){ leds0[x] = leds0[0]; leds0[x+1] = leds0[1]; leds0[x+2] = leds0[2]; } ledStrip.write(leds0); // write to the LEDs delay(100); } However if I execute this code, I still get really weird behavior... It's really driving me crazy
  7. First a big thank you to help me. It now makes sense to me. So in my case when the led strip is 15 leds long I'll should define 45 RGB values, if I want to light them all up of course. I'll give that a try! I thought the len in the write function was how long the led strip actually was. I also tried to use the extra layer library (also in this post of ILAMtitan). I also tried to run the code of bobnova but got the same uncontrollable feeling.
  8. I have a 15 led ledstrip. I tried to program it. I tried like 4 hours and all the ledstrip is doing is showing some random (this how it looks to me). I added some code I uploaden to my MSP430. I tried to program it to display green and then turn of and so on but it's behaving as in the video below. https://www.youtube.com/watch?v=-rSzRfCvNME&list=UUV-uWfvEunXHUINAUfiqBHQ This is the actual code I uploaded to the MSP430 // blink_strip - ws2811 led strip blink example // 11-15-2012 Initial Version 0.1 #include <WS2811Driver.h> // 24 bits of color data stored GGRRBB const uint8_t leds0[] = { 0x00,0xff,0x00}; const uint8_t leds1[] = { 0x00,0x00,0x00}; WS2811Driver ledStrip; // uses P1_7 as datapin connect to DIN on strip void setup(void) { ledStrip.setLEDCount(15); // setup for 4 leds on a strip ledStrip.begin(); // configure P1.7 for output } void loop() { ledStrip.write(leds0,15); // set leds to red,green,blue,white delay(500); ledStrip.write(leds1,15); // turn off all 4 leds delay(500); }
  9. jelledebock

    Pololu led strip for MSP430

    I think I'll use MQTT to talk with the ledstrip. I think this is the way to go, because it's lightweight. For the server side I'll try to thinker around with nodejs. If a manage to create a REST API in node, the possibilities are more a less endless (web app, android app, iOS app). As you've mentioned above I will get stuck every now and then at steps 2 and 3. But I've already discovered that this community is a great way to get help! I'll try to document my adventure and make a nice post on my blog about it.
  10. jelledebock

    Pololu led strip for MSP430

    Nice. Actually I'm only a hobbyist. I'm studying applied computer science (nearly finished), so web programming is fine for me. I'll struggle more to get the wiring and hardware setup right . My stuff hasn't arrived yet, getting impatient now.
  11. jelledebock

    Pololu led strip for MSP430

    I'll "cheat" a bit and use an ESP8266 . It's a rx - tx uart communication. The disadvantage is that a second microcontroller is involved (more power consumption, ...). But about the MSP430 and the WS2812 again ;-) . The energia site is linking to a library, but in description it's saying it's for Stellaris or Tiva C
  12. jelledebock

    Pololu led strip for MSP430

    No I didn't. But I thought the asm code was for the Ledstrip itself which is being driven by a
  13. jelledebock

    Pololu led strip for MSP430

    Hi I want to make a network controlled WiFi strip and was looking for solutions. I ran across the classical "Mosfet RGB trick" and so on. I also saw that Pololu provided a more a less plug and play solution for these led strips. https://github.com/pololu/pololu-led-strip-arduino . I downloaded the source and just tried "compile" in Energia, of course it was complaining ;-). It complained about <EEPROM.h> which I changed by the MspFlash library, then it complained it couldn't find the _enable_irq() and _disable_irq() methods which I changed by _enable_interrupt() and _disable_interrupt(). I also did the following includes. #include "Energia.h" #include <msp430.h> #include <legacymsp430.h> So basically after some trial and error, basically including the right libraries and changing some names I compiled and got a success message. But since I'm not owning one of these strips I couldn't really test it. So I wonder if my modifications make the library really work? I provided the source code, so if anybody could take a look I'd be more than happy. PololuLedStrip.tar.gz
  14. jelledebock

    Photodiode as proximity sensor

    I managed to solve the issue... I used the photodiode I was initially using together with an transistor so I was in fact making my own "homemade" phototransistor. I added my scheme. Finally, after around 10hrs of trial and error I heard the otherwise so annoying sound of a buzzer beep indicating my hand was coming too close .
  15. jelledebock

    Photodiode as proximity sensor

    Thank you! That was the extra information I needed. So the alternation of the voltage is way to small to be noticeable by an analog input. I like your idea to use an additional transistor to amplify the signal. I found an scheme online for that, is it correct? What would be an appropriate value for Rl, considering the spec's of an MSP430 launchpad? You also mentioned that my resistor could be a problem. With my basic knowledge of electricity, Ohm's law tells me if I would take an higher resistance my voltage will also be higher, or am I making an enormous error?
×