Announcement

Collapse
No announcement yet.

Help a beginner jin a simple project please :(

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help a beginner jin a simple project please :(

    Hello friends …for start forgive my poor English as is not my primary language


    To be honest i have no knowledge on programming or electronics but i like to think i am a fast learner...
    So after watching some youtube videos ,ViSi-Genie environment looked friendly and easy so i thought why not !

    And today i got my four μLCD-24PTU picaso displays that i dream to program them and give them to family as gifts

    My goal is to play a few images as "slide show" on them.
    It would be great if i could add a 2sec short sound file i have !
    And it would be greater if when power up ,before the slide show will begin , i could play a two second film as entry ..that i can make in my iMovie ..
    At the moment i have successfully connect everything..and i have manage to show one of my Jpg images in the screen

    Could anyone help me now because i went thru the manuals but i am missing something.

    -How i can add the rest of my jpg images to have a "slide show" when powering?I think it has something to do with the timer?
    -I can see the sound icon but i cant understand how to add a sound file….
    -The last is how i can add a 2sec film only during powering up as a welcoming message?

    ..hope im not asking much

    Thank you in advance for your time and again sorry for my poor English
    Kind Regards
    George

    Last edited by george1; 24th March 2016, 07:17 AM.

  • #2
    What you want to do, does not easily lend itself to ViSi-Genie as it isn't really meant to 'write loops'.

    However, there are a few ViSi examples of this in the forum.

    There is also a ViSi sample supplied with workshop that is almost what you want.

    Check out the File, Samples, Picaso ViSi, UserImages sample.

    To play a sound file use file_PlayWAV("fname1.wav"); just before loading the image control

    Mark

    Comment


    • #3
      Hello there Mark !
      I am so happy you are around ! Your help is very precious to me as im very lost at the moment.
      I had the day off today so i spent watching some tutorial videos and reading the manual but i am still not there.

      I am just playing around and try to learn.
      For example on this UserImages sample you must hover the pointer over name of the picture displayed ,
      so the extra button on the corner to be reviled that there you can delete /move /add photos!! ..but anyway.

      Once i open this UserImages sample for picaso visi and i select my screen μLCD-24PTU
      and click compile n load , i get the error "compile failed,download not done".

      I have format the sd card , no change.
      I have try loading other samples to screen they work fine.
      What am i doing wrong and i cant demo this sample

      I am not caring about to play a sound at the moment as i can not even slide show a few photos i have can you help please?

      Comment


      • #4
        What is/are the compiler error messages display on the bottom of the screen? (select all the lines and the 'right click', that will select and copy the messages so you can simply paste them here)
        Mark

        Comment


        • #5
          Hello Mark! It does not allow me to copy/paste the errors below so i paste here all the lines of this sample !Thank you in advance for your time and your help my friend! #platform "uLCD-24PTU" // Form1 1.1 generated 24/3/2016 7:16:50 μμ #platform "uLCD-24PTU" // Userimages1 1.0 generated 24/3/2016 6:01:36 μμ img_SetWord(hndl, iUserimages1, IMAGE_INDEX, frame) ; // where frame is 0 to 1 img_Show(hndl,iUserimages1) ; img_SetWord(hndl, iUserimages1, IMAGE_INDEX, frame) ; // where frame is 0 to 7 img_Show(hndl,iUserimages1) ; #platform "uLCD-24PTU" /**************************************************************************************** * * * 4D Visi Sample * * * * Date: 3 July 2013 * * * * Description: An example of UserImages. This example creates a simple slideshow * * out of a list of images. * * * ****************************************************************************************/ #inherit "4DGL_16bitColours.fnc" #inherit "VisualConst.inc" #inherit "UserImagesConst.inc" func SlideShow() // slideshow frame handler var private frame := 0; var private image := iUserimages1; // slideshow location in the .GCI var private speed := 1000; var private dir := 0; img_SetWord(hndl, image, IMAGE_INDEX, frame); if (dir) if (frame == 0) frame := img_GetWord(hndl, image, IMAGE_FRAMES) ; frame-- ; else frame++ ; frame := ABS(frame % img_GetWord(hndl, image, IMAGE_FRAMES)); endif img_Show(hndl, image); sys_SetTimer(TIMER1,speed); // reset the event timer endfunc func main() // var hstrings ; // Handle to access uSD strings, uncomment if required // var hFontx ; // Handle to access uSD fonts, uncomment if required and change n to font number // Uncomment the following if uSD images, fonts or strings used. putstr("Mounting...\n"); if (!(file_Mount())) while(!(file_Mount())) putstr("Drive not mounted..."); pause(200); gfx_Cls(); pause(200); wend endif // gfx_TransparentColour(0x0020); // uncomment if necessary // gfx_Transparency(ON); // uncomment if necessary // hFontn := file_LoadImageControl("USERIM~1.dan", "USERIM~1.gcn", 1); // Open handle to access uSD fonts, uncomment if required and change n to font number dropping a and c if > 9 // hstrings := file_Open("USERIM~1.txf", 'r') ; // Open handle to access uSD strings, uncomment if required hndl := file_LoadImageControl("USERIM~1.dat", "USERIM~1.gci", 1); // Form1 1.1 generated 24/3/2016 3:07:57 μμ // Userimages1 1.0 generated 24/3/2016 3:07:57 μμ img_SetWord(hndl, iUserimages1, IMAGE_INDEX, frame) ; // where frame is 0 to 1 img_Show(hndl,iUserimages1) ; sys_SetTimerEvent(TIMER1,SlideShow); // hook video timer 2 sys_SetTimer(TIMER1,1); // and start the video now repeat forever endfunc // Form1 1.1 generated 24/3/2016 6:06:16 μμ // Userimages1 1.0 generated 24/3/2016 6:06:16 μμ img_SetWord(hndl, iUserimages1, IMAGE_INDEX, frame) ; // where frame is 0 to 2 img_Show(hndl,iUserimages1) ;

          Comment


          • #6
            That doesn't come through in any useful way, plus there will be things missing anyway.

            Use File, Zip project and attach it here.

            (Why won't it copy/paste?)
            Mark

            Comment


            • #7
              oups… i think when posting here this forum tries to save space ..it didn't looked like this my post above when i tried to post it in the first place….sorry .
              here is a photo showing some of the errors. and i have a fatal error at the bottom of all of them not shown in the photo..


              http://postimg.org/image/j2jjxaj2x/


              I have no choice but to hand write each error if you need to see them…cause i cant get help anywhere else anyway …


              Thank you Mark

              Comment


              • #8
                i dont know why it doesn't allowing me to copy all errors report….but i noticed that when i click an error the cursor moves in a place in the program,.

                i can try take better photo of all errors if you like!

                Thank you

                Comment


                • #9
                  It is designed to highlight the line of code causing the error, which makes it a bit more difficult to select everything, you need to click on the first line, press shift, click on the last line, then right click somewhere in the listbox.

                  Anyway I can see error now, you appear to have clicked 'paste code at some point and code has been pasted, somewhere it shouldn't be.

                  The #platform statement should be the first in the program, delete the lines before that and try compiling again.

                  You should be able to post images here, 'postimg' seems to add some, err, somewhat unsavoury, advertising
                  Mark

                  Comment


                  • #10
                    ..that took long to upload...Ziped file is attached.Thank you!
                    Attached Files

                    Comment


                    • #11
                      yes i was experiment around but i dont recall saving it when closing the project…maybe i modified the original sample user images code then… i am sorry..
                      Mark is it possible you can delete this lines for me…and attach it back… ultimately i would like to play a small 3sec film only when powering up
                      ..do you think you could modify to include this option in the code for me ?Or it must be done while i have connect everything T H A N K you

                      Comment


                      • #12
                        I've attached the fixed file back, that is only only file that needs changing.
                        Attached Files
                        Mark

                        Comment


                        • #13
                          i am going back to play! Thank you Mark!!!
                          is there a guide you can direct me for reading please regarding the short film i wish to make on the start up?
                          Kind Regards from Greece
                          George

                          Comment


                          • #14
                            Not really, there are so many possibilities it's best to just experiment
                            Mark

                            Comment


                            • #15
                              ….hello again Mark.. how do i use the file you have attached?
                              I have downloaded it and went to file,open, and i could only see it when i select all files.
                              Is that the original complete user images sample code?

                              Thank you

                              Comment

                              Working...
                              X