Jump to content

zeke

Members
  • Content count

    1,761
  • Joined

  • Last visited

  • Days Won

    99

zeke last won the day on June 15

zeke had the most liked content!

About zeke

  • Rank
    Electron Wrangler

Contact Methods

  • Website URL
    http://www.randomelectrons.com

Profile Information

  • Gender
    Not Telling
  • Location
    Calgary, Canada

Recent Profile Visitors

1,635 profile views
  1. zeke

    WS2813 SK9822 APA102 LED

    @FranckRusso, I do not have it but something tells me that you were asking @wangalan this question. Let's see if he pops up with a response.
  2. Could this be a utf-8 font issue?
  3. My gut instinct would be to add an additional condition (a timer) to that while loop. I don't work with that processor so I am not sure of the implementation but here's my pseudo code: while ( (pcb != NULL) && (thisTimer <= ARBITRARY_MAX_WAIT_TIME) ) { ... } I don't know if that makes any sense to do it that way, but that is how I am thinking. Add in a second variable that *you* have control over. Then you can have a measure of sanity of something goes off the rails. YMMV
  4. zeke

    One Wire Controller booster

    Yeah, I built that. I was inspired by something similar a friend of mine created about ten years ago. I also found the book Programming Embedded Systems in C and C++ by Michael Barr to be exceptionally helpful. Chapter nine specifically. So, back when I discovered the loss of my marquee clock code, I went on a rampage to re-write the lost code. The first thing I did was figure out how to write a command line interface parser equal to or better than my friend's cli. Initially, for some reason, I wrote an AT command parser for the marquee clock. But, I found it to be unfriendly. So, I re-wrote it as a human friendly variant. I pulled that cli into this data logger when I decided to go on a sprint to develop this code. Now I am on a rampage learning how to program in PyQt5. I am hoping to have a proof of concept SCADA program. Hopefully, I will have something to demonstrate when I meet up with some friends at the end of the month.
  5. zeke

    One Wire Controller booster

    If anyone is curious, I have been developing the edge router app in pyqt5 on linux. Here is one of the better tutorials that I have found on learning PyQt5. Apparently, there are two different sources to get PyQt5 from: PyQt5 from Riverbank Computing, and Qt for Python from Qt.com, which was originally called PySide(2) PyQt5 is a bit of a mind bender at the start, but it gets better as you climb the learning curve.
  6. zeke

    One Wire Controller booster

    I have been working on the software for the edge router for my data logger. Here is a short video of the various help menus in the system. OneWireDatalogger-HelpScreens.mp4
  7. zeke

    What is your Backup Process?

    Well, I spent $10 tonight. I purchased a perpetual license for BitBucket. I was fearful that I might lose my source code. I chose to host it on my own hardware. That's why it was only $10. I have barely had a chance to use it but I am pleased with the user interface so far. In addition, I installed the nemo-rabbitvcs plugins to my linux mint installation. That way I can integrate git functionality into my file browser (nemo). I used that to do the initial setup of the local git repo.
  8. zeke

    One Wire Controller booster

    IT'S ALIVE!!!! I have 104 ds18b20 sensors wired into my board and it is reading them all. I am celebrating! WOO HOO! Now it's time to crush an mqtt server!
  9. zeke

    DHT11 library for energia

    Hmmm.... I'm not sure if you are panicking or just desperate to avoid the hard work of figuring out how things work. That said, this is the first thing you need to do: write a todo list. Get DHT11 datasheet here. Learn how to use it here. Does that help?
  10. zeke

    MSP430FR6989: Serial port monitor is not working

    Concentrate on one problem at a time. Create a new project. Write a program that tests out only the serial port. Create another project that tests out only the LCD. Divide and conquer!!! Once you have those working then you can get back to that crazy math you are trying to do!
  11. zeke

    MSP430FR6989: Serial port monitor is not working

    Hi @Salibensuleiman Wow! That's a wall of text that is impossible to understand. Please use the code "<>" tags on your software. For example, here is your code #include <LCD_Launchpad.h> #include <driverlib.h> #include <SPI.h> #include <LiquidCrystal.h> #include <driverlib.h> // Required for the LCD //#include <LiquidCrystal_I2C.h> //LiquidCrystal lcd; void setup() { // put your setup code here, to run once: //analogFrequency(10000); Serial.begin(9600); SPI.begin(); } float y11 = 0.0; float y12 = 0.0; float y13 = 0.0; float y21 = 0.0; float y22 = 0.0; float y23 = 0.0; float y31 = 0.0; float y32 = 0.0; float y33 = 0.0; float Ub11, Ub12, Ub13, Ub21, Ub22, Ub23, Ub31, Ub32, Ub33; float IN11, IN12, IN13, IN21, IN22, IN23, IN31, IN32, IN33; float y11New, y12New, y13New, y21New, y22New, y23New, y31New, y32New, y33New; void loop() { // put your main code here, to run repeatedly: // //Diagonal input // float U11=1; float U12=-1; float U13=1; // float U21=-1; float U22=1; float U23=-1; // float U31=1; float U32=-1; float U33=1; //Cross input float U11 = -1.0; float U12 = 1.0; float U13 = -1.0; float U21 = 1.0; float U22 = 1.0; float U23 = 1.0; float U31 = -1.0; float U32 = 1.0; float U33 = -1.0; //Templates A and b //A: float A11 = 0.045404; float A12 = 0.046816; float A13 = 0.046482; float A21 = 0.046741; float A22 = 4.0472; float A23 = 0.046741; float A31 = 0.046482; float A32 = 0.046816; float A33 = 0.045404; //b float b11 = 0.063908; float b12 = -0.061448; float b13 = 0.079005; float b21 = -0.061448; float b22 = 0.052166; float b23 = -0.061448; float b31 = 0.079005; float b32 = -0.061448; float b33 = 0.063908; //I float I = 0.047155; // float y11 = analogRead(A0); // float y12 = analogRead(A1); // float y13 = analogRead(A2); // float y21 = analogRead(A3); // float y22 = analogRead(A0.7); // float y23 = analogRead(A5); // float y31 = analogRead(A6); // float y32 = analogRead(A7); // float y33 = analogRead(A8); int counter = 0; if (counter == 0) { y22New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub22 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y11New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub11 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y12New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23; Ub12 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23; y13New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23; Ub13 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23; y21New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub21 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y23New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub23 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; y31New = y21 * A21 + y22 * A22 + y31 * A31 + y32 * A32; Ub31 = U21 * b21 + U22 * b22 + U31 * b31 + U32 * b32; y32New = y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub32 = U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y33New = y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub33 = U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; IN11 = y11New + Ub11; IN12 = y12New + Ub12; IN13 = y13New + Ub13; IN21 = y21New + Ub21; IN22 = y22New + Ub22; analogWrite(35, IN22); //pin 2.2 IN23 = y23New + Ub23; IN31 = y31New + Ub31; IN32 = y32New + Ub32; IN33 = y33New + Ub33; y11 = 0.7 * tanh(2.0 * IN11); y12 = 0.7 * tanh(2.0 * IN12); y13 = 0.7 * tanh(2.0 * IN13); y21 = 0.7 * tanh(2.0 * IN21); y22 = analogRead(A8); //0.7*tanh(2*IN22)+I; pin 9.0 delay(500); y23 = 0.7 * tanh(2.0 * IN23); y31 = 0.7 * tanh(2.0 * IN31); y32 = 0.7 * tanh(2.0 * IN32); y33 = 0.7 * tanh(2.0 * IN33); counter = 1; } else { y22New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub22 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y11New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub11 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y12New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23; Ub12 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23; y13New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23; Ub13 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23; y21New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub21 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y23New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub23 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; y31New = y21 * A21 + y22 * A22 + y31 * A31 + y32 * A32; Ub31 = U21 * b21 + U22 * b22 + U31 * b31 + U32 * b32; y32New = y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub32 = U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y33New = y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub33 = U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; IN11 = y11New + Ub11; IN12 = y12New + Ub12; IN13 = y13New + Ub13; IN21 = y21New + Ub21; IN22 = y22New + Ub22; analogWrite(35, IN22); //p.n 2.2 IN23 = y23New + Ub23; IN31 = y31New + Ub31; IN32 = y32New + Ub32; IN33 = y33New + Ub33; y11 = 0.7 * tanh(2.0 * IN11); y12 = 0.7 * tanh(2.0 * IN12); y13 = 0.7 * tanh(2.0 * IN13); y21 = 0.7 * tanh(2.0 * IN21); y22 = analogRead(A8); //0.7*tanh(2*IN22)+I; pin9.0 float voltage = Serial.println(y22 * 3.0 / 1023.0); y23 = 0.7 * tanh(2.0 * IN23); y31 = 0.7 * tanh(2.0 * IN31); y32 = 0.7 * tanh(2.0 * IN32); y33 = 0.7 * tanh(2.0 * IN33); } }
  12. I was reading the latest Embedded Muse newsletter from Jack Ganssle when I spotted this link: Akin's Laws of Spacecraft Design They seem to be akin to Murphy's Law. I am chuckling at a few of them. I thought some of you might get a laugh from them as well. Enjoy!
  13. @Rei Vilo That is a pretty significant small detail!!! I have had a few moments to reflect on my software and it is so strange to realize that I too had to add in delay to get my i2c routines working. I was writing an i2c command to my device and then attempting to read a byte response from it. It was not working. For debugging, I inserted a 5000 cycle delay between the command write and the data read so I could see the action on my logic analyzer. It had the side effect of making my transaction succeed! And now you have shown us the exact same thing with the Bosch sensor! Bravo!
  14. @tm4c I think you have a copy-paste error in your code. Check out the error message. Are you using an AVR or a TM4C129? Reconcile that problem and you should be better off.
  15. @dmalawey If you are using the code from the link you provided then I bet you haven't setup the wifi credentials properly. This is a snippet from that code: Is your wifi router called "energia1"? Is its password "launchpad"? Check those two details first and then try again.
×