Show Posts
|
|
Pages: 1 [2] 3
|
|
16
|
International / Français / Re: problème de pointeurs
|
on: November 03, 2012, 01:28:24 pm
|
 1) String existe dans Arduino 2) nous sommes sur Arduino 3) c'est un exemple 4) Le but de ma quête est de convertir une chaine en float ce que tous les languages font couremment depuis plus de trentes ans. 5) Le rôle d'Appelant est dans l'exemple destiné a a) initialiser la première ligne du tableau. b) initialiser NombreFlottant par un appel de la fonction sujet du post. 
|
|
|
|
|
18
|
International / Français / [Résolu !] Problème de pointeurs
|
on: November 03, 2012, 09:01:48 am
|
Bonjour à tous, Je débute en C. J'ai travaillé avec les pointeurs sur un autre langage mais là je suis un peu déconcerté. Voici le problème que je ne résous pas, en tout cas "à quelque chose près" ce que je souhaite réaliser : // Un tableau à deux dimensions char Liste [10][20];
// Une Fonction sensée convertir le paramètre en Flottant (float) : // le paramètre est de la forme "ABC123.456" // La sortie doit être le float 123.456 float Str2F (char chaine ) { float f; char c; c = chaine.substring ( 3 , chaine.length - 3 ); f = float ( c ); return f; }
void Appelant() { ... Liste [1] = "AZE123.45678"; float NombreFlottant = Str2F ( Liste[1] ); ... }
Facile et pourtant
|
|
|
|
|
20
|
Using Arduino / Storage / Re: MEGA with cardinfo.h and "LC studio" SD card reader dont work
|
on: October 09, 2012, 02:56:28 pm
|
Is it bad luck ? First test:64 MB SD card, 10 years old. Arduino MEGA under SD.h & CardInfo. SD card reader (LC studio) on witch one the ground pin of the tension controler 3.3V AMS1117 was not connected to the card ground. Result : Negative. Second test :Same cards but bug repaired (see pictures above) Result : Negative.Third test :Exchange SD card for 32GB Same cards. Result : Negative. Fourth test :Same cards but with level adaptation 5V MEGA / 3,3V SD card (See Levels Adaptation Diagram above)(with 1N4148 instead of BAT83 I advocate). Result : Negative. Fifth test :Exchange SD card for 64MB 10yo UNO card... Resultat : Negative. Sixth test :UNO under SDFatLib & SDInfo. Result : Negative. Seventh test :Exchange SD card for 32GB Result : half positive(reporting error codes by the program). Eighth test :Exchange SD card for a new 2GB. Result : half positive(reporting error codes by the program). Ninth test :exchange 1N4148 (See Levels Adaptation Diagram above) for some BAT83. Result : PositiveTenth test :Exchange SD card for 32GB. Result : PositiveEleventh test :Exchange SD card for 64MB. Result : Negative. Twelfth test :Uno under SD.h & CardInfo. Result : PositiveThirteenth test :MEGA under SD.h & CardInfo OR under SDFatLib & SDInfo. Result : PositiveConclusions :- SD cards that was existing before the SD standard completion are not preferred.
- The cards are sensitive to the shape of the signals.
- Some "LC studio" card readers have a mass default.
Thank you very much, Fat16Lib and Jean-François for your help. 
|
|
|
|
|
21
|
International / Français / Re: CardInfo.h et lecteur de carte SD "LC studio" ne fonctionnent pas...
|
on: October 09, 2012, 12:58:23 pm
|
Cela tient-il de la malchance ? Premier essai :Carte SD 64Mo vieille de dix ans. Arduino MEGA sous SD.h & CardInfo. Lecteur de carte SD (LC studio) dont le pin de masse du régulateur 3,3V AMS1117 n'était pas connecté à la masse carte. Résultat : Négatif. Deuxième essai :Mêmes cartes mais erreur réparée (voir photo plus haut) Résultat : négatif.Troisième essai :Echange SD card pour 32Go Mêmes cartes. Résultat : négatif. Quatrième essai :Mêmes cartes mais avec une adaptation en niveau 5V MEGA / 3,3V carte SD (voir schéma adaptation niveaux)(avec 1N4148 au lieu des BAT83 que je préconise). Résultat : négatif. Cinquième essai :Echange SD card pour 64Mo 10yo Carte UNO... Resultat : négatif. Sixième essai :UNO sous SDFatLib & SDInfo. Résultat : négatif. Septième essai :Echange SD card pour 32Go Résultat : Semi positif(signalement de codes erreur du programme). Huitième essai :Echange SD card pour nouvelle de 2Go. Résultat : Semi positif(signalement de codes erreur du programme). Neuvième essai :échange des 1N4148 (voir schéma adaptation niveaux) pour des BAT83. Résultat : positifDixième essai :Echange SD card pour 32Go. Résultat : positifOnzième essai :Echange SD card pour 64Mo. Résultat : négatif. Douzième essai :Uno sous SD.h & CardInfo. Résultat : positifTreizième essai :MEGA sous SD.h & CardInfo ou sous SDFatLib & SDInfo. Résultat : positifConclusions :- Les cartes qui existaient avant la finalisation du standard SD ne sont pas à privilégier.
- Les cartes sont sensibles à la forme des signaux.
- Certains lecteurs de carte "LC studio" ont un défaut masse.
Un grand merci à Jean-François et Fat16Lib.
|
|
|
|
|
22
|
Using Arduino / Storage / Re: MEGA with cardinfo.h and "LC studio" SD card reader dont work
|
on: October 08, 2012, 04:03:07 pm
|

With SDb & UNO : SdFat version: 20120719
type any character to start
init time: 3 ms
Card type: SD2
Manufacturer ID: 0X6F OEM ID: Product: SMI Version: 1.0 Serial number: 0 Manufacturing date: 7/2012
cardSize: 3887104 (512 byte blocks) flashEraseSize: 128 blocks eraseSingleBlock: true
SD Partition Table part,boot,type,start,length 1,0X0,0X6,131,3886973 2,0X0,0X0,0,0 3,0X0,0X0,0,0 4,0X0,0X0,0,0
Volume is FAT16 blocksPerCluster: 64 clusterCount: 60726 freeClusters: 60725 fatStartBlock: 132 fatCount: 2 blocksPerFat: 238 rootDirStart: 608 dataStartBlock: 640
type any character to start
With SDa & UNO : SdFat version: 20120719
type any character to start
init time: 2 ms
Card type: SDHC
Manufacturer ID: 0X1B OEM ID: SM Product: 00000 Version: 1.0 Serial number: 2330206577 Manufacturing date: 10/2011
cardSize: 61315072 (512 byte blocks) flashEraseSize: 128 blocks eraseSingleBlock: true
SD Partition Table part,boot,type,start,length 1,0X0,0XC,8192,61295848 2,0X0,0X0,0,0 3,0X0,0X0,0,0 4,0X0,0X0,0,0
Volume is FAT32 blocksPerCluster: 64 clusterCount: 957491 freeClusters: 957490 fatStartBlock: 9614 fatCount: 2 blocksPerFat: 7481 rootDirStart: 2 dataStartBlock: 24576
type any character to start
Tomorrow, I'll try with the MEGA
|
|
|
|
|
23
|
Using Arduino / Storage / Re: MEGA with cardinfo.h and "LC studio" SD card reader dont work
|
on: October 08, 2012, 03:17:50 pm
|
That's exactly what I was telling myself  It's only the difference... the voltage adaptation. If you saw the electronic diagram I made based on the LC studio card reader (black components) and my adaptation système, you can see three diodes... I recommend Schottky diodes like BAT85 and now I just have some 1N4148... then the high level is 3.3V but the low one is 0,6V. it is certainly not ideal. I'll work with (on) that now.
thank you very much for your advice Have a good evening, although it is perhaps a little early for you at this time... Best regards
|
|
|
|
|
24
|
Using Arduino / Storage / Re: MEGA with cardinfo.h and "LC studio" SD card reader dont work
|
on: October 08, 2012, 01:03:18 pm
|
I am going to buy another SD card... 2GB. Appoint it (nominate) SDb, want you ? I formated it as you told me with SDFormatter.
the result with SDInfo is : SdFat version: 20120719
type any character to start
card.init failed SD errorCode: 0X2 SD errorData: 0X57
type any character to start
card.init failed SD errorCode: 0X2 SD errorData: 0X57
type any character to start
init time: 47 ms
Card type: SD2 readCID failed SD errorCode: 0X10 SD errorData: 0XFF
type any character to start
card.init failed SD errorCode: 0X2 SD errorData: 0X4F
type any character to start
card.init failed SD errorCode: 0X2 SD errorData: 0X57
type any character to start
card.init failed SD errorCode: 0X2 SD errorData: 0XAB
type any character to start
card.init failed SD errorCode: 0X2 SD errorData: 0XAB
type any character to start
card.init failed SD errorCode: 0X2 SD errorData: 0X55
type any character to start
init time: 39 ms
Card type: SD1 readCID failed SD errorCode: 0XF SD errorData: 0X0
type any character to start
It's not the same result for each tests.
For the 32GB of yesterday,... Appoint it SDa,... I have some different results too :
SdFat version: 20120719
type any character to start
card.init failed SD errorCode: 0X8 SD errorData: 0X1
type any character to start
card.init failed SD errorCode: 0X8 SD errorData: 0X7F
type any character to start
init time: 47 ms
Card type: SDHC readCID failed SD errorCode: 0X10 SD errorData: 0XFF
type any character to start
init time: 47 ms
Card type: SDHC readCID failed SD errorCode: 0X10 SD errorData: 0XFF
type any character to start
init time: 4 ms
Card type: SDHC readCID failed SD errorCode: 0X10 SD errorData: 0XFF
type any character to start
init time: 75 ms
Card type: SDHC readCID failed SD errorCode: 0X10 SD errorData: 0XFF
type any character to start
card.init failed SD errorCode: 0X8 SD errorData: 0X3
type any character to start
init time: 28 ms
Card type: SDHC readCID failed SD errorCode: 0X10 SD errorData: 0XFF
type any character to start
init time: 30 ms
Card type: SDHC readCID failed SD errorCode: 0X10 SD errorData: 0XFF
type any character to start
init time: 31 ms
Card type: SDHC readCID failed SD errorCode: 0X10 SD errorData: 0XFF
type any character to start
init time: 30 ms
Card type: SDHC readCID failed SD errorCode: 0X10 SD errorData: 0XFF
type any character to start
card.init failed SD errorCode: 0X2 SD errorData: 0X55
type any character to start
|
|
|
|
|
27
|
Using Arduino / Storage / Re: MEGA with cardinfo.h and "LC studio" SD card reader dont work
|
on: October 07, 2012, 05:39:10 pm
|
|
Thank you for answer to me SurferTim,
There is just one file in 8.3 format name. As I wrote, I change the MEGA to be sure that the problem can't be imputed to it.
I think that it will be funny to write an answer to the scrolling question in your scrolling texte
Thanks too for your answer Fat16Lib,
The 64MB sd card is marked "Multimedia card", so... I think its an MMC... Thank you for all these tips.
I formatted the cards with SDFormater V3.1. I'll try SdFat and post the results.
it is certain that writing a library as SD.h is a big job. Successful work indeed! Admittedly, this is a big library for a card Uno but perhaps it could be made more efficient for the more powerful cards, such as MEGA and those that will probably come out in the coming months or years...
Are you the author of this library? I think I read somewhere your username !...
anyway, thank you very much
|
|
|
|
|
28
|
Using Arduino / Storage / Re: MEGA with cardinfo.h and "LC studio" SD card reader dont work
|
on: October 07, 2012, 02:34:03 pm
|
|
Great news for me... I did not become sénileet !!
I tryed with an Arduino Uno. The firts tests let me think that I could have to retire early ... but finaly I removed again the 64MB SD card to try an 32GB in FAT32 formatted. Result :
Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC Could not find FAT16/FAT32 partition. Make sure you've formatted the card
Besides the first electronic bug, I wonder if : 1) the MEGA coupled to an SD card can be a problem for SD.h 2) a 64MB SD card can be a problem for SD.h 3) a 10 years old Card wich is working fine (I test regularly every hour) can cause problems for SD.h 4) Contrary to what you may read on the official site, the FAT16 could pose a problem SD.h
|
|
|
|
|
30
|
International / Français / Re: CardInfo.h et lecteur de carte SD "LC studio" ne fonctionnent pas...
|
on: October 07, 2012, 02:09:37 pm
|
Grande nouvelle... Je ne suis pas (encore) sénile !!
J'ai essayé sur un Arduino Uno. Les premiers tests m'ont laissé penser que je devrai prendre une retraite anticipée ... mais finalement j'ai échangé la carte SD 64Mo encore une fois avec la 32Go et... miracle,... j'ai eu le "grand" bonheur de lire ceci : Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC Could not find FAT16/FAT32 partition. Make sure you've formatted the card
Après le premier problème d'ordre électronique, je me demande si : 1) le MEGA associé à une carte SD peut être un problème pour SD.h 2) une carte de 64Mo peut être un problème pour SD.h 3) une carte de dix ans d'âge qui fonctionne très bien (Je la teste une fois par heure) peut être un problème pour SD.h 4) contrairement à ce que l'on peut lire sur le site officiel, la FAT16 peut être un problème pour SD.h voir réponse de fat16lib sur http://arduino.cc/forum/index.php/topic,125973.msg947984.html#msg947984
|
|
|
|
|