logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 104499 1246
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #271 21367912
    MAJSTER XXL
    Level 29  
    It's cool that you're working something individually with the code, I'd steal something from you later. For now I'm going my own way, today I coded and updated the file player:
    - entering the menu by holding down encoder button 1 for 3 seconds,
    - then wheel to select "File player" and confirm with encoder button 1,
    - the contents of the main folders of the card are listed and the first file of the first folder is played,
    - using the encoder wheel you can choose which folder you want to play next
    - from mp3 files the ID3 metadata is displayed quite correctly, I attach pictures
    In the flac files I have to do ID3 chunking, because they are printed quite differently on the serial than from mp3, the creator of the audio library also seems to have a big mess in it.
    In general, I still plan to use the encoder wheel to freely select No. 1 files from the directory similarly listed as radio stations from the bank.

    LCD screen displaying information about an audio file being played. .
    LCD screen displaying audio file playback with metadata.

    When I go to the folder with the flac files, it resisted starting:
    Audio file read logs in Arduino IDE .

    That's enough for today:
    OLED display showing information about a playing music file. .
  • ADVERTISEMENT
  • #272 21369916
    robgold
    Level 20  
    From the series of what I did for my radio today :)

    - I improved the exit from any sub-menus
    The function "if (displayActive && (millis() - displayStartTime >= displayTimeout)) " is supposed to exit to the main screen but ....
    It does this incorrectly. If we enter the BANK selection menu and we don't select anything (by turning the encoder or not), then, unfortunately, when we return by turning the station selection - we select from the BANK on which we left the indicator "bank_nr". In other words you have to remember the variable bank_nr = previous_bank_nr; so that you always come back with the correct value of bank_nr. I hope I didn't confuse things too much.

    in addition:
    - I introduced sliders/progress bars for the volume control menu and the bank menu. Eventually there will be an Update option in the bank selection: "NET" - "SD card"
    - slider in the bank selection menu
    - fix (described above) to return correctly from the bank selection menu
    - for beautification I added an icon and information if we cannot initialise the card, because it has become an important element holding the radio data
    - I trimmed the station name to 26 characters
    - I have created a template in excel for preparing the memory bank files

    MAJSTER XXL Code as much as possible to make available for everyone. Take what you will need. I think I'll set up a GitHub to upload it there
    Strength in community

    LCD display showing Internet Radio and SD card error message LCD display showing volume level 13 on a slider. LCD display showing the text BANK:6 with a progress bar below.
  • #273 21370516
    robgold
    Level 20  
    MAJSTER XXL .

    I uploaded the latest compilation with the player today as a test.
    Unfortunately it still works very capriciously, long file names don't work, it doesn't open flac files, mp3 also very selectively.
    Stubbornly wants to play from the folder "System Volume Information" to the selection of folders with space also does not suit it.

    It is a -> very very early pre-beta release - I would call it :) .

    For handling ID3 TAGs, I guess it will be worth implementing the "u8g2 text scroll" function to make it scroll nicely. I'll sit down to do that in my spare time.
    Now it's time to design the mount for the OLED and print it out. This mess of a circuit board needs to be sorted out.
  • #274 21370958
    MAJSTER XXL
    Level 29  
    @robgold Interesting, I don't have this problem with System Volume- it is skipped. I have spaces in all my folder names and it works normally, so I don't understand why it's happening to you- it's not by chance the fault of a substituted font?
    I have over 60 folders on my card and all the mp3s with different bitrates play correctly. I just have to figure out the right moment to put the audio file data on the display, because if I put it too early it sometimes shows up with some rubbish.
    I also don't understand why it doesn't nicely display a selected folder in a rectangle - just like a radio station - even though the function for scrolling and displaying folders has the same settings as for scrolling through radio stations. The flac files from my card play normally.
    The fact that I already had the so-called previous bank and station number in the first version of the radio, but here apparently variables were declared, but I did not assign them later - it escaped me. Yesterday, when I was working on the file player, I had the same situation with the previous folder and file numbers, so that after turning the wheel but without confirming them, they returned to the correct numbers - I have that covered.
    Arduino IDE screen showing music playback logs. .

    Display showing a list of music files.
    File player screen with a list of music directories. .
  • ADVERTISEMENT
  • #275 21372146
    robgold
    Level 20  
    Master , to test what cool stuff you've done in the code I always upload your entire original file to ESP. Only then I copy myself what I like there :) .

    As for the font and selection highlighting problem.
    I've had a look at the code and the problem lies in the incorrect jumping and painting of this frame. The Spleen font we are using is called Spleen6x12 but it actually has 6 boxes in the x axis and 13 in the y axis. Take a peek at the screenshot from the Fony program I use to edit fonts.
    It purposely shows the little 'y' because it is one of the critical ones that just uses the fields below the tenth i.e. it uses 11,12 and 13 to display the tail.

    In the station listing section this is also incorrectly done, but as the list fills the whole screen and the font is of type mr (not tf which means transparent) each subsequent line cuts out 1 selection pixel and you can't even see it. Take a look at the attached screenshot.

    In order to correctly display the selection in the code section below, you must always jump 13 boxes. That's why I changed the multiplier value to 13. The -2 and +8 offsets are just cosmetic to start writing as high as possible to make the last line of the list look decent because 64 does not divide by 13.

    // Limit the length to 42 characters
    String displayedPath = fullPath.substring(currentDirectory.length(), currentDirectory.length() + 42);

    // Highlight the selected directory
    if (i == currentSelection)
    {
    u8g2.setDrawColor(1); // White background colour
    u8g2.drawBox(0, displayRow * 13 - 2 , 256, 13); // Draw a rectangle as the background for the selected folder
    u8g2.setDrawColor(0); // Black text colour
    }
    else
    {
    u8g2.setDrawColor(1); // White text colour on black background
    }

    // Display path
    //u8g2.setCursor(0, displayRow * 10 + 10); // Set the cursor for the line in question
    //u8g2.print(displayedPath); // Display directory name

    u8g2.drawStr(0, displayRow * 13 + 8 ,String(displayedPath).c_str());
    // Move to the next row
    displayRow++;
    }

    Going back to the player topic I have corrected two things:
    You are indexing the folders from 1 while the listing starts in the array from 0. Since we already have a variable of type Int with a sign, in order to "catch" the first folder you need to count from 0 and change in the code to replace the value of <0 (was <1) with 0. Otherwise we will lose the folder with indexing [0].

    if (digitalRead(DT_PIN2) == HIGH)
    {
    folderIndex--;
    if (folderIndex < 0)
    {
    folderIndex = 0;
    }
    Serial.print("Backward folder number: ");
    Serial.println(folderIndex);

    I also analysed why my folder with FLAC files wouldn't play and it turned out that trimming the names causes the path to the files to be lost.
    It just so happened that I put the folder [Varius Manx -Z Zanim Zrozumiesz (Złota Kolekcja)] into the test, which in the terminal resulted in the
    Varius Manx -Zanim Zrozumiesz (Złota Kolekcja)], which in the terminal results in clipping the name to [Varius Manx -Zanim Zrozumiesz (Złota Kolekcja)] and because this clipped name then takes an active part in assembling the path to the file, the player cannot find the correct file.

    eof_mp3 01 - Varius Manx - Moonlight Song.flac
    info End of file "01 - Varius Manx - Piosenka księżycowa.flac"
    File playback: 2/3 - 02 - Varius Manx - Before you understand.flac
    info buffers freed, free Heap: 231616 bytes
    info ERROR: File doesn't exist: / Varius Manx -Zanim Zrozumiesz (Zł /02 - Varius Manx - Zanim zrozumiesz.flac

    And besides:
    I made myself a cool welcome screen :) .
    I designed a frame for the display, which will eventually be the base for the case.
    In the v6 version, I raised the bezel-display distance to 3.8mm (according to the datasheet it is 2.8mm but that doesn't match reality)

    I am attaching the 7z file - inside the SKP file (from the online version of SketchUp) and the STL to print out



    Display frame design created in SketchUp. .
    Display frame model in SketchUp .
    3D model of a display frame .
    Display frame design with mounting brackets .
    Screen displaying the text Internet Radio and musical notes. .
  • ADVERTISEMENT
  • #276 21372300
    MAJSTER XXL
    Level 29  
    You've got it covered nicely, I've also thrown in a lot of changes today, I've grouped some repetitive code into void functions, it's all started to work much better, I'm currently focusing my attention on the file player so that the artist and title info is pulled from the printed info on the series instead of digging around and changing the Audio library to suit myself. I have made it so that when there are no ID3 tags, the file name is displayed. In general I've noticed that the Audio library has a problem displaying the bitrate of flac files from the file player correctly. Test my player if you can. I still need to refine the menu for selecting and exiting the Radio / Player function. I was also thinking of a separate menu command like update banks, all at once, so that I'm not constantly downloading and saving them to the card. Thanks for directing me to the actual font size and the needed field size for the highlight. Since the lowercase 'g' was displaying correctly before, I thought the lowercase 'y' was that without the lower horizontal tail, and it is indeed lowered.
    Fact, I'll still check the clipping of the name which is then taken for the pathname, I just had short folder names and didn't notice that - thanks for the good point.
  • #277 21372781
    Andrzej Ch.
    Level 33  
    @robgold
    Hi. I've been following your revisions to the project diligently and it looks like, like the author, you are in control of what you are doing. This is a good thing, because as I can see the project has potential.
    However, I couldn't find attached to the post, the display frame design files.
    You also mentioned that you'd probably set up a github account for yourself, which would make it a lot easier to make any changes and corrections and keep your branch of the project in check.
    If this is up to date, please set up said account and share this information with us.

    Once again, great respect to the Author @MAJSTER XXL and to you for developing this worthy project.
    I'm keeping my fingers crossed as I also intend to build this radio.
  • #278 21373875
    robgold
    Level 20  
    @Andrzej Ch.. .

    Actually, I don't know for what reasons the 7z attachment didn't add properly.
    When it comes from GitHub I even already tried the first approach but some "yeggold" took the name "Robgold" from me to that nothing has been published for many years. I even had the suspicion that maybe it was me, but unfortunately none of the email addresses I have matched the password recovery and not having an account makes it impossible to suspect the owner's email ;) .
    I was thinking of another name, until something distracted me during the Christmas break and, of course, I did not create an account.... but I promise to make up for it by the end of the weekend!

    @MAJSTER XXL
    Today I sat down and "ported" the player code to my compilation. This is probably the hardest thing for anyone to do.
    To copy with relative understanding code that you didn't write yourself :) .

    Just as a quick aside, the Volume Information problem continues. Despite bypassing the folder "System Volume Information" it is still in the indexing by which an empty selection is created because the index is then used as if (i == currentSelection) etc....

    A solution might be to move all the music to the "music" folder on the card and only look for it there. This will keep the relative order on the card's main path. Option two would be to try to pose "traps" when "String fullPath = directories[ i ];" will have an index corresponding to the System Volume Information skip it index for highlighting. Just does it make sense to dummy up and predict all cases ?
    I will test further. Something I will probably still find ;) .

    I will add from myself:
    I have changed the player screen and at the moment when there is no ID3Tag I cut out the name and title according to the scheme Artist - Title.mp3 because this is how I always "rip" CDs to the digital collection. Finally, since we have a graphic OLED, let's take advantage of its possibilities.

    At the moment I have made an enclosure design based on aluminium profiles (there are no aluminium profiles on the market or I haven't found any) for a large 160x160 enclosure with a height of 40mm (the 3.12 display requires a minimum of 35mm). Ultimately I want to move to a 2 inch display and Hammond 1455R1601BK case which is 30mm.

    As soon as I have printed and tested the new enclosure I will upload the files here.
    As you can see the front panel is still in the 'alpha' version.

    Prototype of front panel enclosure in alpha version.
    .
    Front panel design for an electronic enclosure with a rectangular cutout. .
    Music player screen displaying the song Brother Louie (New Version) by Modern Talking. .
    RamkaOLE..12.7z Download (160.08 kB)
    .
  • #279 21373922
    MAJSTER XXL
    Level 29  
    I've today added alphabetical sorting when listing folders, as adding more to the card put them mostly at the end and the order was non-existent. I'm still working on getting rid of the System Volume Information so it doesn't list. By the way, I've made the fixes you suggested, although not everything yet, but it's working quite nicely already. I encourage those who are watching to make a kit like this for themselves to start with on a simple contactor, because it's fun. Now, during the winter, I still have the desire to work on it in the evenings, but from the spring I will have less time for it, so maybe my colleagues will polish this project more.


    Screenshot of Arduino IDE displaying a list of music tracks. .
  • #280 21375025
    robgold
    Level 20  
    I managed to print a prototype of the case. As it is in a prototype there are many things to improve but it promises to be good.
    On the front panel the card reader has to be moved, because on the left side there will be a physical switch and on the right a microSD card plus two encoders.

    Prototype casing with front panel featuring an opening and an attached circuit board. .
    Prototype electronic device casing with a cutout for a display. .
    Prototype housing made of white material. .



    @MAJSTER XXL .

    I have added a lot of cosmetics in the player itself:
    - for a file without id3tag I put together a description from the name of the file itself
    - fonts, screens
    - I threw out the Bank selection case from the menu - a remnant probably from version 1 of the radio, which caused one unnecessary click with the encoder
    - still in a few places I caught the entry folderIndex=1 instead of folderIndex=0
    - I changed: //listDirectories("/music"); -> listDirectories(currentDirectory.c_str()); so that the path can be manipulated in one place in the variable declarations
    - I moved all the music to the /music directory

    Here a moment of description. I replaced the currentDirectory path and corrected the variable:
    folderNameString = directories[folderIndex]; -> folderNameString = currentDirectory + directories[folderIndex]; .

    Curiosity:
    somewhere when setting the path to the card's main folder it does a double slash. It works because the SD library is immune to
    this type of entry -> //. Despite a lot of fine-tuning as you can see on the serial with the name "Debug" I didn't catch where this is added.
    Perhaps you can find it before I get to it. If you type currentDirectory = "/music" instead of "/" the problem goes away.

    debug--FolderNameString: //Happysad -Unhappy
    debug--fileName: 01 - Happysad - Mileowy Las.flac
    .

    Display of a player prototype showing information about the track being played. .


    Am I the only one who is slowly starting to be "bothered" by the lack of left-right, up-down, OK buttons in the middle ? I have the impression that it is becoming increasingly difficult to have such an extensive device on 2 encoders and 2 buttons.

    I miss a bit of revision of the next releases of the ino file from your side.
    I know it is "alive" all the time but it would be easier to follow the changes. Could you introduce something like this? e.g. naming the file after the insertion date?

    Plans and dreams or such a small "ToDo" list from my side: :)
    - unify the language either EN or PL because now there is a Volume and a player in Polish
    - scrolling of the text on the display and replacement of all those case selections with long artist or song or file names
    - track to music stored on SD card
    - configuration kept on SD card (GitHub server address settings, all graphics, long button press time, maybe language ?)

    I'll take a peek at that segueing you did in my free time because it's also a super thing very much needed.
  • #281 21375300
    MAJSTER XXL
    Level 29  
    As for the need to put button support in, I'm also thinking of adding them back in. I have no idea how to continue to operate this with just encoders, I thought about it but the code would get terribly convoluted and not very readable and error prone. Maybe use a joystick type switch? I should be able to find one at my place so I'll try to add it, I'm also thinking of adding an IR receiver to some sort of remote control- I'm going to have to go with the remote from my Technics in this regard as it has everything I need to operate it. As for the EN language version, it's actually time to give this some serious thought, why don't you take it up?

    edit.
    I managed to add a joystick, I created an additional void handleJoystick() function under its handling. For now I've done switching from the extreme X-axis positions of the radio stations one forwards and backwards each, tomorrow I'll add this functionality to the file player for testing. As for the revision of the version on github, for the time being, when something comes out, I immediately synchronise it to github, the changes are then visible in the commits:

    https://github.com/sarunia/ESP32_radio_player...mmit/eba3d0c6494e286d0b3b59579d7268f65c525314

    I had a regular joystick:


    Simple modular joystick with a black knob and connection pins. .
  • #282 21375893
    robgold
    Level 20  
    I changed the names to English. I have reworked the menu a little bit in the style of station selection and added the radio in the exit function after idle so that it exits the menu correctly.
    Otherwise, when you enter the menu, turn to Player but do nothing, the radio goes dead. You cannot change the station.

    currentOption = INTERNET_RADIO;
    displayRadio();

    What I have done in the player is that at the top, if the name fits, it prints the folder name plus the track number and if it doesn't fit
    I cut it off and add three dots. Cosmetic, but nice to look at.

    @MAJSTER XXL, do you also have problems with large FLAC files ? I have ones of 30 and 100MB and already with the 30MB one I have a problem - it doesn't play for me.

    I'm not convinced about the joystick. It is very difficult to implement it into the case. I have never seen a nice solution to this problem.
    Probably buttons would be better. E.g. something like in the attachment or just move the functions to buttons in one row.
    It's always easier to get a tact switch and print a place for it. What do you think about this ?

    IR remote control as much as possible YES.

    Music player display showing Smooth Jazz Cafe track information. .
    Menu screen with options Music player and highlighted Net Radio.
    Button on a green circuit board with directional arrows and an OK button in the center. .
  • #283 21376478
    atu1981
    Level 11  
    welcome!
    first of all, many thanks for such a nice project! i just started the build and i have a problem. version v1 i fired up without a problem, but in v2 i cant run. The code loads without a problem, but my display does not work. What could be the cause?
  • #284 21376526
    MAJSTER XXL
    Level 29  
    @atu1981 Have you re-soldered the jumper to the one marked?


    3.12 OLED display with a marked jumper location. .

    @robgold Under what name to look for such a cool switch (5x tact switch), after the graphics it just sends me somewhere far east? I haven't checked large flac files, I'll look for some later and let you know. Today, I've mastered the joystick jump to the file being played one forwards / backwards. Backwards is complicated because you have to rewind the directory to the beginning of root.rewindDirectory() and in the next loop jump to the appropriate file. I have to additionally desensitise the joystick because sometimes it will flip "left" on its own.
  • ADVERTISEMENT
  • #285 21376653
    atu1981
    Level 11  
    I have the jumpers set to 4SPI. That is, the resistors at the locations of R5 and R8.

    Added after 14 [minutes]: .


    Close-up of a circuit board with marked solder points R5 and R8. .
    Close-up of a circuit board with connected colorful wires. .
    ESP32-S3 board with connected colored wires. .

    This is what the connection looks like to me. What is wrong?
  • #286 21376698
    robgold
    Level 20  
    @atu1981 .
    And in the correct places did you connect it to the ESP ? The schematic is a bit confusing because it suggests the bottom of the PCB.
    Have a look at the pictures I took of it for you quickly. On the first one you have the location relative to the ESP where the display plugs in. In the second and third you have the connection to OLED 3.12 and the jumper configuration.

    By the way, I'm testing a small 2.08-inch OLED with the SH1122. It's not bad looking. It will eventually be in one of my versions.

    ESP module connected to an OLED display with a weather message. .
    Close-up of a PCB with markings BS1, BS0, R8, R6, and others. .
    Close-up of wire connections to a display module on a PCB. .


    @MAJSTER XXL .
    I have already seen these buttons a few years ago from "colleagues" from the east on Electronics. I don't even know if TME doesn't sell them now.
    Link to Ali: https://pl.aliexpress.com/item/1005001594194930.html

    Multi-directional button with OK text and arrows on a black background.

    I found a cheap 5 button "digital" joy on Botland.
    https://botland.com.pl/joystick-joystick-ardu...m-41-kierunkowy-10x10x10mm-5904422321086.html
    Square momentary push button with a black stem and four leads.

    Added after 8 [minutes]:

    >>21376653 Arthur, now I saw that you only have the display plugged in.
    From a certain version of the ino file at the master, the radio will not run without the card plugged in. You will only get a message on the serial.
    I additionally in my version initialise the OLED beforehand precisely so that the user gets a feedback message.
  • #287 21376730
    MAJSTER XXL
    Level 29  
    @atu1981 Post a screen from the serial terminal, we'll see where you are with the program. Personally I prefer to power this OLED from 5V, it needs a bit of current, I don't know if from the USB of the computer it will go-even I didn't have the idea to test with a USB-only power supply.
  • #288 21376736
    robgold
    Level 20  
    Master, it will work with 3.3V from ESP.
    Admittedly, if you light a lot of pixels, you can see that the inverter on 18V slightly squats, but it works.
    I "chase" mine like this and power the whole thing from a USB port with 500mA :) .
  • #289 21376806
    atu1981
    Level 11  
    program, downloaded directly from github without any changes or corrections. To check the correctness of the board-display connection, I uploaded a sample sketch to this display assigning the no. as from the project and as you can see it works....





    How do I get the terminal screen? - soryy i am not that advanced ;-(

    Added after 2 [minutes]:

    I forgot about the photo...

    LCD display with connections on a desk.
  • #290 21376836
    robgold
    Level 20  
    And what configuration line do you have in this test softy ? In the original there is R2 rotation which means you should see the image correctly having the connector on the right side.
  • #291 21376873
    atu1981
    Level 11  
    I have uploaded this code:
    #include <Arduino.h>
    #include <U8g2lib.h>
    #include <SPI.h>
    #include <Wire.h>

    #define SCREEN_WIDTH 256
    #define SCREEN_HEIGHT 64

    U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI display(U8G2_R0, /* clock=*/ 38, /* data=*/ 39, /* cs=*/ 42, /* dc=*/ 40, /* reset=*/ 41);

    // 'logo', 256x64px
    const unsigned char myBitmaplogo [] PROGMEM = {
    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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
    0x80, 0x01, 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, 0x80, 0x02,
    0x40, 0x01, 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, 0x80, 0xec,
    0x27, 0x01, 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, 0xf9,
    0x9f, 0x01, 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, 0x10, 0xfe,
    0xff, 0x10, 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, 0x20, 0x7e,
    0x7e, 0x2c, 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, 0x44, 0x3f,
    0xfd, 0x26, 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, 0xc8, 0x9f,
    0xfb, 0x13, 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, 0xf0, 0xcf,
    0xf7, 0x0f, 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, 0x80, 0xe1, 0xe7,
    0xef, 0x8f, 0x03, 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, 0x40, 0xf2, 0xf3,
    0xdf, 0xcf, 0x02, 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, 0xc0, 0xfc, 0xf9,
    0xbf, 0x7f, 0x02, 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, 0x80, 0xfd, 0xfc,
    0x7f, 0x3f, 0x01, 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, 0x7f, 0xfe,
    0xff, 0xfe, 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, 0x14, 0x3f, 0xff,
    0xff, 0xfd, 0x38, 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, 0xa4, 0x9f, 0xff,
    0xff, 0xfb, 0x27, 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, 0xc8, 0xcf, 0xff,
    0xff, 0xf7, 0x27, 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, 0xf8, 0xe7, 0xff,
    0xff, 0xef, 0x1f, 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, 0xc0, 0xf0, 0xf3, 0xff,
    0x3f, 0xdf, 0x0f, 0x07, 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, 0x20, 0xf9, 0x39, 0xf8,
    0x0f, 0xbe, 0x9f, 0x04, 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, 0x40, 0xfe, 0x1c, 0x38,
    0x06, 0x7c, 0x7f, 0x02, 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, 0x80, 0x7e, 0x1e, 0x08,
    0x00, 0xfc, 0x7e, 0x03, 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, 0x3f, 0x1f, 0x00,
    0x10, 0xf8, 0xfd, 0x01, 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, 0x9f, 0x1f, 0x00,
    0x18, 0xf8, 0xfb, 0x01, 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, 0x80, 0xcf, 0x1f, 0x10,
    0x18, 0xf8, 0xf7, 0x01, 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, 0x80, 0xe7, 0x1f, 0x38,
    0x1c, 0xf8, 0xef, 0x01, 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, 0x80, 0xf3, 0x1f, 0x38,
    0x1c, 0xf8, 0xdf, 0x03, 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, 0x80, 0xf3, 0x3f, 0x38,
    0x1c, 0xfc, 0xcf, 0x03, 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, 0x80, 0xe7, 0x3f, 0x18,
    0x1c, 0xfc, 0xe7, 0x01, 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, 0x80, 0xcf, 0x3f, 0x18,
    0x1c, 0xfc, 0xf3, 0x01, 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, 0x9f, 0x3f, 0x18,
    0x1c, 0xfc, 0xf9, 0x01, 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, 0x3f, 0x3f, 0x18,
    0x1c, 0xfc, 0xfc, 0x01, 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, 0x80, 0x7e, 0x3e, 0x18,
    0x0c, 0x7c, 0x7e, 0x03, 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, 0x40, 0xfe, 0x3c, 0x1c,
    0x0c, 0x7e, 0x7f, 0x02, 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, 0x20, 0xf9, 0xf9, 0xff,
    0x0f, 0x9e, 0x9f, 0x04, 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, 0xc0, 0xf0, 0xf3, 0xff,
    0x3f, 0xce, 0x0f, 0x07, 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, 0xf8, 0xe7, 0xff,
    0xff, 0xe7, 0x1f, 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, 0xe8, 0xcf, 0xff,
    0xff, 0xf3, 0x37, 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, 0xe4, 0x9f, 0xff,
    0xff, 0xf9, 0x25, 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, 0x1c, 0x3f, 0xff,
    0xff, 0xfc, 0x38, 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, 0x7f, 0xfe,
    0x7f, 0xfe, 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, 0x80, 0xfd, 0xfc,
    0x3f, 0x3f, 0x01, 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, 0xc0, 0xfc, 0xf9,
    0x9f, 0x7f, 0x02, 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, 0x40, 0xf2, 0xf3,
    0xcf, 0xcf, 0x02, 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, 0x80, 0xe1, 0xe7,
    0xe7, 0x8f, 0x03, 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, 0xf0, 0xcf,
    0xf7, 0x0f, 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, 0xc8, 0x9f,
    0xf9, 0x13, 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, 0x44, 0x3f,
    0xfc, 0x26, 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, 0x28, 0x7e,
    0x7e, 0x2c, 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, 0x10, 0xfe,
    0x7f, 0x10, 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, 0xf9,
    0x9f, 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, 0x80, 0xec,
    0x2f, 0x01, 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, 0x80, 0x06,
    0x40, 0x01, 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, 0x01,
    0x80, 0x01, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00
    };


    void setup(void)
    {
    display.begin();
    }

    void loop(void)
    {

    display.firstPage();
    do
    {
    display.drawXBMP(0, 0, 256, 64, myBitmaplogo);

    display.drawLine(0, 0, 255, 0);
    display.drawLine(0, 1, 255, 1);
    display.drawLine(0, 2, 255, 2);

    display.drawLine(0, 61, 255, 61);
    display.drawLine(0, 62, 255, 62);
    display.drawLine(0, 63, 255, 63);

    display.drawLine(0, 0, 0, 63);
    display.drawLine(1, 0, 1, 63);
    display.drawLine(2, 0, 2, 63);

    display.drawLine(255, 0, 255, 63);
    display.drawLine(254, 0, 254, 63);
    display.drawLine(253, 0, 253, 63);

    } while ( display.nextPage() );

    delay(15000);

    display.firstPage();
    do
    {
    // We draw two straight lines
    int x1 = SCREEN_WIDTH / 3; // x end of first line (1/3 width)
    int y1 = SCREEN_HEIGHT * 2 / 3; // y of the end of the first line (2/3 of the height)

    // first line with arrows at the ends
    display.drawLine(0, y1, SCREEN_WIDTH, y1);
    display.drawLine(x1 - 5, 5, x1, 0); // top arrow
    display.drawLine(x1 + 5, 5, x1, 0); // top arrow
    display.drawLine(x1 - 5, SCREEN_HEIGHT - 6, x1, SCREEN_HEIGHT - 1); // bottom arrow
    display.drawLine(x1 + 5, SCREEN_HEIGHT - 6, x1, SCREEN_HEIGHT - 1); // lower arrow

    // second line with arrows at the ends
    display.drawLine(x1, SCREEN_HEIGHT, x1, 0); // second line
    display.drawLine(SCREEN_WIDTH - 6, y1 - 5, SCREEN_WIDTH - 1, y1); // Right arrow
    display.drawLine(SCREEN_WIDTH - 6, y1 + 5, SCREEN_WIDTH - 1, y1); // Right arrow
    display.drawLine(5, y1 - 5, 0, y1); // Left arrow
    display.drawLine(5, y1 + 5, 0, y1); // left arrow

    display.setFont(u8g2_font_ncenB10_tr);
    display.drawStr(93, 12, "64px");
    display.drawStr(205, 38,"256px");

    } while ( display.nextPage() );

    delay(15000);
    }
  • #292 21376892
    MAJSTER XXL
    Level 29  
    @atu1981 turn on one by one in the Arduino IDE according to the screen, set to 115200, also compare all the settings below.


    Screenshot showing Arduino IDE settings. .
  • #293 21376933
    robgold
    Level 20  
    Upload this for a trial, there is a lot of redundant code here but I tested the display on this.

    #include <Arduino.h>
    #include <U8g2lib.h>

    #ifdef U8X8_HAVE_HW_SPI
    #include <SPI.h>
    #endif
    #ifdef U8X8_HAVE_HW_I2C
    #include <Wire.h>
    #endif

    #define SD_CS 47 // CS (Chip Select) pin for communication with SD card, selectable as SPI interface
    #define SPI_MOSI 39 // MOSI pin (Master Out Slave In) for SPI interface
    #define SPI_MISO 0 // MISO pin (Master In Slave Out) for SPI interface
    #define SPI_SCK 38 // SCK (Serial Clock) pin for SPI interface
    #define I2S_DOUT 13 // Connection to DIN pin on DAC
    #define I2S_BCLK 12 // Connection to BCK pin on DAC
    #define I2S_LRC 14 // Connection to the LCK pin on the DAC
    #define SCREEN_WIDTH 256 // Screen width in pixels
    #define SCREEN_HEIGHT 64 // Screen height in pixels

    U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI u8g2(U8G2_R2, /* cs=*/ 42, /* dc=*/ 40, /* reset=*/ 41); // Hardware SPI
    //U8G2_SH1122_256X64_F_4W_HW_SPI u8g2(U8G2_R2, /* cs=*/ 42, /* dc=*/ 40, /* reset=*/ 41); // Enable U8G2_16BIT in u8g2.h
    SPIClass customSPI = SPIClass(HSPI);
    const int SD_CS_PIN = 47; // CS pin for SD reader

    //U8G2_SH1122_256X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h
    //U8G2_SH1122_256X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h

    // End of constructor list


    // This example shows a scrolling text.
    // If U8G2_16BIT is not set (default), then the pixel width of the text must be lesser than 128
    // If U8G2_16BIT is set, then the pixel width an be up to 32000


    u8g2_uint_t offset; // current offset for the scrolling text
    u8g2_uint_t width; // pixel width of the scrolling text (must be lesser than 128 unless U8G2_16BIT is defined

    const char *text = "Radio Italo4You - Music play now ! "; // scroll this text from right to left
    unsigned long delayTime = 30;
    static unsigned long Time1 = 0;


    void setup(void) {

    SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
    SPI.setFrequency(1000000);

    // SPI initialisation with new pins for SD card reader
    customSPI.begin(45, 21, 48, SD_CS_PIN); // SCLK = 45, MISO = 21, MOSI = 48, CS = 47
    u8g2.begin();


    //u8g2_font_inb30_mr
    //u8g2.setFont(DotMatrix13pl); // set the target font to calculate the pixel width
    u8g2.setFont(u8g2_font_fub14_tf);
    width = u8g2.getUTF8Width(text); // calculate the pixel width of the text
    u8g2.setFontMode(0); // enable transparent mode, which is faster
    }

    void scrollText()
    {

    u8g2_uint_t x;
    Time1 = millis();
    u8g2.firstPage();
    do {

    // draw the scrolling text at current offset
    x = offset;
    //u8g2.setFont(u8g2_font_inb30_mr); // set the target font
    //u8g2.setFont(DotMatrix13pl);
    do { // repeated drawing of the scrolling text....
    //u8g2.drawUTF8(x, 30, text); // draw the scolling text

    u8g2.drawStr(x, 30, text);
    x += width; // add the pixel width of the scrolling text
    } while( x < u8g2.getDisplayWidth() ); // draw again until the complete display is filled

    u8g2.setFont(u8g2_font_inb16_mr); // draw the current pixel width
    u8g2.setCursor(0, 58);
    u8g2.print(width); // this value must be lesser than 128 unless U8G2_16BIT is set

    } while ( u8g2.nextPage() );

    offset-=1; // scroll by one pixel
    if ( (u8g2_uint_t)offset < (u8g2_uint_t)-width )
    offset = 0; // start over again

    //delay(10); // do some small delay

    }

    void loop(void)
    {

    if (millis() - Time1 >= delayTime)
    {
    scrollText();
    }
    }
  • #294 21376988
    atu1981
    Level 11  
    @Majster XXL - screen shot of my settings and monitor data.

    Screenshot of Arduino IDE with ESP32S3 board settings. .

    @robgold - after uploading this code there is progress! The display is working. We know the connection is ok. Just why is the right program in me working? Is something missing? or do I have the wrong settings?


    LCD display connected to a microcontroller with the message music Radio Italo4Y 334 displayed. .
  • #295 21377000
    robgold
    Level 20  
    Upload this:
    https://github.com/dzikakuna/ESP32_radio_evo2

    ...and paste what is displayed on the OLED. I've set up a GitHub, this is the evo2 version of my interpretation of the code for this radio.
    Info for those who are interested :) .

    As for me, you are missing the SD card and since a certain version it has become crucial. Without it, the radio won't work at all because stations and station links are stored there.
  • #296 21377059
    atu1981
    Level 11  
    After uploading your code, what I was waiting for appeared :-) .


    Display showing SD card error - check slot on an internet radio.

    Actually I have to add a card because there is no station.

    OLED display showing units Hz bit Kbps held above a gaming controller.

    I will keep you informed. And already thanks a lot for your help gentlemen !!! And for improving the mood !
  • #297 21377062
    robgold
    Level 20  
    Thanks and flowers to the Major. I only distribute drinks at this banquet ;) .

    I still have an evo1..it's the last one that seems to run without a card, when I check I'll send you then you can test it for yourself before adding a reader.
  • #298 21377144
    atu1981
    Level 11  
    Of course Majster has done a great job here.... nobody can deny it and all credit to him :-) .
    meanwhile after connecting the card.... I obviously have another problem :-D . The stored music files read perfectly from the card, but the radio does not work:-( .


    Screenshot showing error messages after connecting the SD card. .
  • #299 21377186
    robgold
    Level 20  
    It should pull the bank file from the server when you apply power and it detects it is missing. Hold down the encoder knob and change the bank to any bank to force it to be read.
  • #300 21377220
    atu1981
    Level 11  
    You are a champion! After holding down the encoder it pulled up the station. Thanks again for your help and time!!!

Topic summary

The discussion revolves around building an internet radio and audio file player using the ESP32-S3 microcontroller. The project includes features such as an OLED display, Wi-Fi connectivity, and audio playback capabilities. Users share their experiences with hardware setup, including issues with pin configurations, library compatibility, and troubleshooting compilation errors in the Arduino IDE. Suggestions for libraries, such as ESP32-audioI2S and WiFiManager, are provided to enhance functionality. Participants also discuss the importance of proper wiring, capacitor usage for encoders, and the potential for adding features like DLNA support and a web management interface for radio station management. Several users report on their progress, share code snippets, and offer solutions to common problems encountered during development.
Summary generated by the language model.
ADVERTISEMENT