Jump to content

outbaxx

Members
  • Posts

    277
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by outbaxx

  1. If someone adds or delete a define line before the line where the lights are defined in the A10.lua it will get a new address, but so would anything after the new added line so it’s weird that it’s only the lights, but perhaps it’s defined at the end of the file?

  2. There is an issue with SPI.h that says it’s for megaAVR architecture and not avr architecture.
    I get a lot of errors concerning RX & TX too pointing to the DCS-bios library.

    Maybe it’s fixable but my brain just said “no thanks” and back to the nanoV3 I went.

    • Thanks 1
  3.  //Datapanel Diplay//AJS37#include #include #include //#define DCSBIOS_RS485_SLAVE 22#define TXENABLE_PIN 2#include "DcsBios.h"int power_is_on = 0;int CK_LED_ison = 0;int lastCKcheck = 0;int lastPowerCheck = 0;U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI display1(U8G2_R0,/* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 4);U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI display2(U8G2_R0,/* cs=*/ 5, /* dc=*/ 6, /* reset=*/ 8);/* Fontname: AJS_DATA38 Copyright: outbaxx Glyphs: 12/26 BBX Build Mode: 0*/const uint8_t AJSDATA[531] U8G2_FONT_SECTION("AJSDATA") =  "\14\0\4\4\5\6\6\7\7\42%\0\0$\0%\377\0\0\0\0\1\366 \6\0\0\313r-\15\220" "\200\243\362p\361\340\201\10\27\0\60&S|\203\362J\330\352\321\233\7BL\31)W\302\334J\375\377" "\227\353L\224+b\312\310\3\61\217^\65L\5\0\61\27K\234\205r#f\350\14\222\24\17>\30Q" "\254\376\377\177\67\2\0\62\64S|\203\362J\330\352\321\233\7BL\31)W\302\340\302\342\245-\66m" "\330\360a\253\15\33>l\265a\253\15\233.\375 \310\203\21\17F<\30\362 \4\0\63\64S|\205" "\362J\330\352\321\33SF\312\25)W\302\340\302\342U\27/]\62\323\264\311\215\227\7P\274<\200\205" "\273\63Q\256\210)#\17\304  "\224+R\256H\261\62\305\312\24#T\252P)R\205J\25z \342\301\3\24\17\306\26\257\357\1\14" "\2\65\70S|\205\362x\20\344\301\210\7#\36\214x \244x\375\342\330\243\7a\36\10y \344\224" "\11s%\314\225\7P\274\370\302\335\231(W\304\224\221\7b\36\275j\230\12\0\66\67S|\203\362J" "\330\352\321\233\7BL\31)W\302\334\302\235\27\61\366\350A\230\7B\36\10\71e\302\134\11s%J" "\352\313u&\312\25\61e\344\201\230G\257\32\246\2\67,R\204\201r\370\3\326\25\227.\134\272p\351" "\302\245\13\227.\134\272p\351\302\245\13\227.\134\272p\351\302\245\13\227.M\36\200x\0\70\70S|" "\203\362J\330\352\321\33SF\312\25)W\242\244.K\224+R\256L\251R\355\26\256k\365\250T\231" "rE\312\225(\251\227%\312\25)W\304\224\231G\257\32\246\2\71\67S|\203\362J\330\352\321\233\7" "BL\31)W\302\334J}Y\242\234\211r&L\35y \344\201\230\7\201\236\31)\276pw&\312" "\25\61e\344\201\230G\257\32\246\2\0\0\0\4\377\377\0";void setup() { //start displays display1.begin(); display2.begin(); //set contrast display1.setContrast(50); display2.setContrast(50); //font for displays display1.setFont(AJSDATA);  display2.setFont(AJSDATA);//draw 37 (For test purpose) //display1.drawStr(-10,45," 37 "); //display1.sendBuffer(); //display2.drawStr(-10,55," 37"); //display2.sendBuffer();DcsBios::setup();



    This is part of my code, I only use 12 glyphs but my font data contains a lot more data than yours.
    It’s weird that you get the compile error.

  4. Mine look like this:


     /* Fontname: AJS_DATA38Copyright: outbaxx Glyphs: 12/26 BBX Build Mode: 0*/const uint8_t AJSDATA[531] U8G2_FONT_SECTION("AJSDATA") =  "\14\0\4\4\5\6\6\7\7\42%\0\0$\0%\377\0\0\0\0\1


    There is more data but there’s no need to copy/past all of it.

    Did you have a - before the f ?

    Your says ugc but it should say U8G2

  5. I just tried that convertbdf, but the 'white area for for choose a file' is nowhere to be seen - is there any special extension that I need to run this?
    ***EDIT***
    I resolved the "no module named PIL" error, after watching a load of videos on how to correct it on Youtube - shame most of them forget to metion the syntax errors that will keep on appearing unless you type "exit()", that would have saved me some head bashing.
    However when I ran the python code I got a "can only concatenate str (not "int") to str" message, which when I look at the solution makes me want to go and drown myself. 
    I give up on python......
    Cheers
    Les

    You need to open a cmd in the folder you have bdfconv, just type cmd in the folder location bar and hit enter.
    If you then type bdfconv you will see the options.
    Mine look like this:

    bdfconv -f 1 -m "32,45,48-57" -n AJSDATA -o AJSDATA.c AJS_DATA38.bdf

    -f 1 mean that it’s for u8g2
    -m “ “ mean that I only want to convert those glyphs
    -n is the name of the font in the .c that will be referred to in the sketch
    -o is the name of the .c
    AJS_DATA38.bdf is the name of my .bdf

    /F
  6. Does anyone know if there are any u8g2 fonts that resemble 14 segment LCD displays?
    Cheers
     
    Les

    I made my own fonts using the apps that olikraus provided, Fony to draw the font and save to .bdf, then convert to .c and put it in the arduino sketch.
    Took a good while for me to do it but it was worth it.

    /F
  7. Hi

    im revisiting my stepper sketches, im using i think its Ian's code made for CraigS for X27 and VID60 steppers and i saw this:

    struct StepperConfig {
      unsigned int maxSteps;
      unsigned int acceleration;
      unsigned int maxSpeed;
    };

    but later when using the struct it looks like this:

    struct StepperConfig stepperConfig = {
      5760,  // maxSteps 720full*8micro
      3000, // maxSpeed
      500 // acceleration
      };

    Shouldnt it actually look like this?:

    struct StepperConfig stepperConfig = {
      5760,  // maxSteps 720full*8micro
      500, // acceleration
      3000 // maxSpeed
      };

    To me it look like the order of acceleration and maxSpeed is wrong and should be as in the last example of code.

    Cant say ive noticed it under the years ive been running the steppers but i just might have had luck with the initial numbers 🙂

    /F

    • Thanks 1
  8. it is strange, it's almost as if the OLED / LCD devices interfere with the signal somehow. I had previously noted that you can't run an OLED and a stepper motor successfully one one Nano as the stepper movement is massively impacted. My suspicion for that is that the stepper update  cadence is directly related to the OLED refresh rate, and the U8G2 driven OLEDs would slow it down to a point where it was useless.
    However I can't imagine why there would be any effect on other Nanos that are just connected via RS485
    Despite this, the multiple Mega master solution does seem to be a viable one so my intention is to use one dedicated Master for all the stepper motor driven devices, and one or two others for all the remaining OLEDs, LCD's and things like the CLP
    One other thing I will try is some 5v bus bars so that the 5v supply to the devices are not just on the RS485 lines. I doubt it will make any difference but costs nothing to try
    Les

    Awesome!! I have this issue too, I have my servos connected to a PCA9685 with external power and I couldn’t figure out why I got this behavior. My steppers work as they should though.
    So a second mega to run the gauges/ or the oleds should do the trick? I’m also using the U8G2 on my displays. I have one Nano per display as I use my custom font and that maxes out the memory :)

    Cheers
    /F
  9. Just a question, is that so that all your gauges read zero when you return to DCS next time? If so, a simple zeroing code in the sketch will do that, I have it on virtually all my stepper driven gauges, so when I connect all my gauges go to the zero position automatically
    Cheers
     
    Les

    Yes, I have zeroing on connect too but some gauges like fuel is often low after a flight and the zeroing routine do many steps to make sure it’s on zero, it sound like grinding gears and I don’t like it :)
    If it’s on zero when I leave I don’t have to do as many steps to zero, probably best to have some zeroing if some steps get skipped when running the sim.

    /F
×
×
  • Create New...