Problème de LED via timer

Bonjour je suis actuellement en terminal STI2D, et pour mon projet de bac je dois rendre un aquarium automatique. Je suis charger de LED et je dois faire allumé la LED de Heure X a heure Y. Le problème vient des minutes et du systeme d'heure qui part en truc bizarre.
  -Je m'explique pour les heures ma LED s'allume quand je le dit (par exemple il est 10 heure j'ai programmer ma LED pour qu'elle s'eteigne à 8 heure et quel reste allumé jusqu'a 11 heure cela fonctionne. Mais si je lui d'eteindre à 8 heure et quel reste allumé jusqu'a 10 heure cela ne fonctionne plus.
  -Pour les minutes un peu le même problème mais il y a aussi le fait que si la lumière s'eteint à 15h30 et s'allume a 14h45 il considere 14H45 comme plus grand que 15H30.
Donc voila mon problème : comment resoudre ces 2 problematique ?
ps : oui je sait qu'il sont debrancher  
Merci d'avance

En gros je pense qu'il faut comparer des grandeurs en minutes. Donc par exemple 13h45 = 13*60+45 = 825. De même 14h30 = 870 (qui est bien plus grand que 825).
Pour minuit, il y a effectivement un cas particulier à gérer... C'est votre excercice, et c'est la partie la plus intéressante. Je veux bien aider pour débloquer les problèmes techniques, mais là il vous faut trouver l'algorithme adapté...
Bonne continuation 
Francis M | Voir mon profil
Certified LabVIEW Developer

Similar Messages

  • My 5 year old iMac's hard drive is at the point of failing.  I'm trying to save al files on it, but it wont allow backup via Time Machine to an external hard drive.  How can I keep from losing all the files and programs if the hard drive fails?

    I'm concerned that my iMac, purchased 5 years ago, is about the crash and I can't back up my files and programs to an external hard drive via Time Machine because the computer freezes after only a couple hundred MB and gets nowhere near the required amount.
    How can I save these files and programs if the computer hard drive fails or has to be replaced without the backup being able to be done? I need to do something quickly, but I'm not sure what I can or should be doing.

    Get an external hard drive, some good ones that I like are the OWC, http://www.macsales.com Mercury Elite Pro drives...they are very good and reasonably priced.
    Get the drive, connect via USB or FireWire, then use Disk Utility to format the new drive as Mac OS X Extended (Journaled), and then use Disk Utility to Restore the current drive to the new drive.  Restore actually clones the drive so you will have a bootable backup on the external drive.
    After you have formatted and named the external drive, click Restore in the main Disk Utility window, drag the name of the old hard drive to the Source box, and drag the name of the new external drive to the Destination box.  DU will make an exact clone of the internal drive on the external drive.
    That clone will be a complete backup of the operating system and all of your data.
    You can test it by restarting the iMac and hold the Option key.  That will give you a grey screen showing all bootable drives.  Just click the external drive, then click the upward pointing arrow under it and the iMac will boot from that drive.

  • How can I restore my iTunes library via Time Machine after an erase/install and upgrade to Snow Leopard?

    Actual problem:
    I reinstalled all my programs that I need without a hitch. Meanwhile, I've been trying to recover the few files (mostly music) I actually store on my computer's hard drive as opposed to on my external HDs. I use one external HD for my graphic files and the other is strictly for Time Machine backups. I tried to recover my iTunes music, but I got a message that says: "The file: "iTunes Library.itl" cannot be read because it was created by a newer version of iTunes." I restored (I thought) my iTunes library Username/Music/iTunes." Additionally, I was going to upgrade to Mountain Lion, but I have seen that there were issues with Lion and iTunes libraries so I'm a little wary of this.
    Excuse the long explanation, but I figure the problem may possibly be in the details of the weeks prior this problem:
    I have recently been having issues with my iMac. I brought it in to see a Genius twice within the past month and they couldn't seem to find the problem. (It would restart Finder of it's own accord while I was using Adobe CS programs) I figured it was worth backing everything up via Time Machine and doing a complete erase/install/factory reset. I did so and had a problem again, and brought it in again, third time. The Genius did another diagnostics tests and found nothing and said my erase/install probably did the trick, but time will tell. I am, after the erase/rewrite and upgrade running Mac OS X 10.6.3 and previous to this was still running Tiger.

    So, I didn't update iTunes and the rest of it after installing Snow Leopard. My stupidity, I figured that the OS was more up to date than the one I had previously so that all the programs that come with it probably were more current than the ones I was using. However, now that I have updated all my software, I am still getting the same message from iTunes that I was previously. I cannot open iTunes at all, same "The file: "iTunes Library.itl" cannot be read because it was created by a newer version of iTunes." message. I'm confused again. Checked a few other threads and whatnot and cannot seem to figure this out.

  • I've had a new hard drive installed and reloaded all my stuff via time capsule and now can't connect to the internet although it say Airport is connected. How can I fix this problem ?

    Just had a new hard drive for my iMac and reloaded all my stuff via time capsule, all works fine apart from Safari which won't connect to internet. Airport is connected but each time Safari comes back saying there is no connection....any help gratefully recieved.

    So you have the apple rotuer called a time capsule  and you have complete the frist time machine back up? but there is not internet access ?
    If so.
    Opem airport utiltiy on your Comptuer :
    What is the IP ? > if its 169.254.xx.xx > its a self assigned
    Try power cycling the Internet source  for up to 1 mintue and make sure all the lights  turn off.
    In Airport Utility Version 5.5.3 / 5.6.1
    Gi > Intenret > conncetiong sharing > Is it off  bridge mode change it to share a public Ip address
    In airport Utility  version 6.0/6.1
    Edit > network > rotuer mode : Should be DHCP and NAT unless you use PPPoE to conecnt to the internet then this is automatically invoked.

  • HP Laserjet 1020 Print Wirelessly Via Time Capsule?

    Is it possible to set up an HP Laserjet 1020 to print wirelessly via time capsule? I already know I have to use the 1022 driver, and my printer works perfectly when the usb is plugged into my Macbook air. I plugged it into the new time capsule I just bought and added it on my Macbook as a network printer, but it wont print. Any tips or suggestions would be extremely helpful! Thanks in advance!

    Hi there,
    I would recommend reviewing the article below.
    OS X Mountain Lion: Set up a printer connected to a Time Capsule or AirPort base station
    http://support.apple.com/kb/PH10875
    -Griff W.

  • External drive for iTunes library and backing up via time machine

    Hi, I currently have an 320gb external drive plugged into usb port of my imac for time machine back up, but my itunes library is 500gb and currently excluded from time machine back up, I would like to buy a 2 or 3tb external drive and then move my itunes library to that to free space on my imac.
    I'd really like to know the best way to set up and what to buy, ie, if i move the library to an external drive am I able to back up the external drive via time machine, plus I assume if I do this i need a second external drive or time capsule to back up the library
    Also the external drive is plugged directly into imac but I have an airport extreme is there any benefit plugging the drive into this, would this mean you access file from network (should you do this if its used for time machine), should I get rid of the extreme and buy a time capsule
    Thanks in advance

    Hi, I'd recommend one of these...
    http://eshop.macsales.com/shop/firewire/1394/USB/EliteAL/eSATA_FW800_FW400_USB
    FW400 will be faster than USB2, & FW8000 even better.
    I see no advantage to plugging it into Your Extreme.

  • Whats the best way to transfer everything from my old macbook pro to a new mac mini, i have a external hard drive which i backup to regularly via time capsule

    whats the best way to transfer everything from my old macbook pro to a new mac mini, i have a external hard drive which i backup to regularly via time capsule

    Check out > OS X Lion: How to use Migration Assistant to transfer files from another Mac

  • HT201250 old data transferred to new computer via time machine, is external hard drive still usable

    I set up my new macbook from an old macbook via time machine and an external WD Harddrive.
    The setup partitioned my macbook to two user id's, now I need to back up. 
    The old user id is backing up everything again and the new user id wants to create a new backup to my WD Harddrive like it is not used.
    I don't believe that my WD was partitioned.
    Help!  How can I continue using my WD and backup both user id information without losing anything?

    Welcome to the Apple Support Communities
    When you turn on the new iMac for the first time, Setup Assistant will ask you to restore a backup, so connect the external disk and follow steps to restore all your files to your new iMac. Your new Mac will have the same settings and programs as your old computer.
    In other cases, I would recommend to restore the whole backup without using Migration Assistant or Setup Assistant, but a Late 2012 iMac uses a special OS X build, so the OS X version that you're using on your old Mac won't work on the new one. For more information, see > http://pondini.org/OSX/Home.html

  • Unable to back up external hard drive via Time Machine.  Says no room but has back ups from two previous Mac notebooks on it.  Tried deleting them and now can't do anything.  Any ideas?

    Unable to back up external hard drive via Time Machine.  Says no room but has back ups from two previous Mac notebooks on it.  Tried deleting them and now can't do anything.  Any ideas?

    As john noted, eventually that external is probably not going to be big enough, but it certainly is for now. The HD just needs enough capacity to cover the amount of data on your internal HD, not the internal HD's total capacity.
    Format/partition the external as follows and you should be set to go:
    1. Connect the external HD to the MBP.
    2. Open Disk Utility on the MBP.
    3. Select the external HD in the left pane.
    4. Click on the Erase tab.
    5. Choose the Format: Mac OS Extended (Journaled).
    NOTE: if you want to zero the HD (which I always think is a good idea, but does take time), click on Security Options, click the button for Zero Out Data, click OK. The larger the HD, the longer this will take, in some cases several hours.
    6. Click on Erase and wait for the entire process to finish.
    7. Click the Partition tab.
    8. Click on Volume Scheme: and choose the number of partitions (just one in this situation).
    9. Click on the Options button (located underneath the Volume Scheme pane) and select GUID.
    10. Click Apply.
    11. Quit Disk Utility.
    Backup your internal to the external. What application are you using to backup with? I highly recommend both SuperDuper! and CarbonCopyCloner.

  • Does the new airport extreme support backing up via time machine to an external hard drive pluged into the usb port

    Does the new airport extreme support backing up via time machine to an external hard drive pluged into the usb port

    Yes, but you might want to note that the port on the AirPort Extreme is only USB 2.0, and that it runs at about half the speed of the USB 2.0 port on a computer, so things are going to be quite SLOW as far as backups are concerned, or anything else for that matter.

  • HT4889 Transferred files via time machine and not log in password will not allow me to log in

    I have a new MacBook pro, I transferred files via time machine and a removable hard drive. Now new MacBook does not recognize the log in password. What can I do to reset the password?

    Did you migrate when you first booted up in Setup Assistant or did you migrate later? When you migrate later it can create a second account, check in Mac HD/Users to see if this is the situation.

  • Blurb Book in Lightroom 5 on my Mac disappeared after 3 days of work. Where can I find a backed up copy via Time Machine or anywhere else?

    Blurb Book in Lightroom 5 on my Mac disappeared after 3 days of work. Where can I find a backed up copy via Time Machine or anywhere else?

     
    Welcome to the WD Community.
    1) I assume I can  just hook the unit up via USB to my Mac and use iPartiion to reformat the drives, assuming each of the 4T drives will be seen by iPartition as a separate drive. That much seems straighforward.
    Yes, and in case you ipartition dont see the unit properly, you can use the disk utilities on your Mac and you will be able to reformat the unit to make it compatible with your system.
    2) Is my next step to reinstall the WD software and how do I do that? I've downloaded the Drive Utilities and Securities install apps - I assume I just run these with the drive still connected and that's all I need to do?
    Yes, just run the applications.
    3) What about the firmware update for Mac - when should I run that??
    Normally, firmware updates are released to fix any issues that you might encounter on the drive. the latest one was released on 9/24/2014 and it fixed an issue with the drive dropping off of the list after system wakes up from standby mode. 
    5) And what about the "My Book Live Duo Setup" app for Mac - is that for a completely different model? What's the difference between "My Book Live Duo" and "My Book Duo"? It's these little things that I find so confusing. 
    Those are different units. The MBL Duo is a NAS (Network attached system) and the My Book Duo is a DAS (Direct attached system)
    6) Lastly, when I have all the software installed, is that when I follow the procedure described in the Knowledge Base article ID 5724, "How to install a My Book Live or My Book Live Duo on Windows (8, 7, Vista, or XP) or Mac OSX for the first time"? Or is that procedure only for "My Book Live Duo" but not for "My Book Duo"?? 
    That procedure is for the network units, not for your drive.
     

  • I was transferring data from my old iMac to my new iMac via Time Machine. After about 4 hours, the electrical power fluctuated and turned off my wi-fi. Now most of my necessary programs are useless. How do I erase and start over?

    I was transferring data from my old iMac to my new iMac via Time Machine. After about 4 hours, the electrical power fluctuated and turned off my wi-fi. Now most of my necessary programs are useless. How do I erase that mess and start over?

    Hello there, LynnS.
    The following Knowledge Base article and it's referenced link should get you started with the Erase and Install of Mavericks:
    OS X Mavericks: Erase and reinstall OS X
    http://support.apple.com/kb/PH14243
    Once you've gone through those 2 articles, this article should help you with restoring from your Time Machine Backup:
    OS X Mavericks: Recover your entire system
    http://support.apple.com/kb/PH14185
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Imported old computer via time machine into new 2012 macbook pro, but its still running ilife 09 instead of 11?

    imported old computer via time machine into new 2012 macbook pro, but its still running ilife 09 instead of 11?

    I am assuming you had iLife 09 on the old computer - when you moved everything over, that came along with it.
    I also have older versions of iLife (on install disks) and just recently got a new 2012 Macbook Pro. I noticed that iMovie 11, iPhoto and Garageband (I think) are listed in my Mac App Store Purchases with a notation to "accept". So you might want to check MAS to see if the apps are sitting there.
    Now, I have chosen not to accept them for now for two reasons: I have iLife 11 on a disk and prefer that rather than having it tied to MAS/Apple ID and as long as I have my disk version installed, I also still have iDVD which I use a lot. I'm not sure if "accepting" those three from MAS would wipe out my iLife 11 installs including iDVD (which would be unacceptable for me). So, since I already have the latest version, I've opted to ignore the "accept" and, in fact, will leave it like that - if I ever sell this machine, the buyer can then accept them if they want with their own Apple ID. So before accepting the apps (if they are listed in MAS), you might want to check to make sure that your iLife install isn't wiped out - that is, if you have iDVD and want to keep it.

  • Recovering Mac HD via Time Machine Backup fails because "Restore system from backup" doesn't show in Utilities Menu of original install. DVD

    Hi, after serious problems (troubleshooting didn't help) with my iMac G5 (PPC) running Mac OS X Leopard I've tried to recover my Mac HD via Time Machine (exactly as described by David Pogue on page 242 of the Leopard Missing Manual). However, "Restore system from backup" in the Utilities Menu of my original Leopard installation DVD failed to show up. What can I do?
    Any assistance will be greatly appreciated -
    Ballant

    Hi Ballant,
    I'm not very good with TM, nor a fan of it, but our resident king of TM, Pondini, has a vast array of very well done TM trouble shootings...
    http://pondini.org/TM/Troubleshooting.html

Maybe you are looking for

  • Font Scrolling Illustrator CS6

    In Illustrator CS6 I can no longer use my scroll wheel when the font window list is open and it takes forever to click the up and down arrow to find fonts. Is this a setting that can be changed? I am on a PC. Thanks

  • LR 3.5 won't open catalog after hard drive crash/recovery

    The catalog and the rest of my files were restored to the new HD installed in my WinXP laptop by computer repair techs. After I reinstalled LR, I get the dread "LR cannot use the catalog named "Lightroom 3 Catalog" because it is not writable..." Ther

  • Conditionally Hide and Show a column in a template based on a column data

    Hi , We have an RTF template for Oracle iExpense Report. We have two types of Expense type . Business and Non-Business. We need to conditionally enable Host Country and Merchant Name if the Expense Type is Non- Business and hide the two columns if th

  • Upgrade 4.6C to ECC 6.0 - Key figures missing in Treasury drill down report

    Hello experts, We have upgraded from SAP version 4.6C to ECC 6.0. Due to this fact, we have converted all the TR-TM and TR-LO master data and transaccional data, using TPM_MIGRATION. However, when we start the tests in the system, we have noticed tha

  • 8530 Internet Explorer Issues

    Device info Your carrier: Sprint Model info and OS version:8530  v5.0.0654 (Bundle 1108, Platform 4.2.0.298 Apps and free space File free before and after a battery remove/replace: Post battery space - 114402645 bytes Did a battery pull fix your issu