String.h ou le trouver

bonjour

je cherche le fichier string.h

j'ai trouvé un truc mais je ne sais pas le transformer en fichier .h

00001 /* string.h stdc header
00002    Copyright (C) 2000, 2003 Free Software Foundation, Inc.
00003    Written by Stephane Carrez (stcarrez@nerim.fr)       
00004 
00005 This file is free software; you can redistribute it and/or modify it
00006 under the terms of the GNU General Public License as published by the
00007 Free Software Foundation; either version 2, or (at your option) any
00008 later version.
00009 
00010 In addition to the permissions in the GNU General Public License, the
00011 Free Software Foundation gives you unlimited permission to link the
00012 compiled version of this file with other programs, and to distribute
00013 those programs without any restriction coming from the use of this
00014 file.  (The General Public License restrictions do apply in other
00015 respects; for example, they cover modification of the file, and
00016 distribution when not linked into another program.)
00017 
00018 This file is distributed in the hope that it will be useful, but
00019 WITHOUT ANY WARRANTY; without even the implied warranty of
00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021 General Public License for more details.
00022 
00023 You should have received a copy of the GNU General Public License
00024 along with this program; see the file COPYING.  If not, write to
00025 the Free Software Foundation, 59 Temple Place - Suite 330,
00026 Boston, MA 02111-1307, USA.  */
00027 
00028 #ifndef _STRING_H
00029 #define _STRING_H
00030 
00031 #include <stddef.h>
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00037 extern void* memset (void * p, int val, size_t len);
00038 extern void* memcpy (void* to, const void* from, size_t len);
00039 
00040 #ifdef __cplusplus
00041 }
00042 #endif
00043 
00044 #endif

string.h est présent dans l'installation de l'IDE ARDUINO. En cas de besoin, il ne doit pas être bien difficile à trouver (chercher dans le répertoire arduino15).
De toutes façons, il suffit de l'inclure, je dirais même que c'est fait par défaut (dans Arduino.h).

bonjour,

je te tutoi car nous avons déjà pas mal discuté avant que ma santé me grille une partie de ma cervelle en 20 secondes. ...qui n'était déjà pas terrible...
perte de mes connaissances sur certain domaine comme arduino, des années de ma vie effacées , fuitttt ! format 90 à 2020 ....en fouillant des trucs reviennent mais c'est pas foudroyant.
perte orthographe (qui n'était déjà pas terrible) donc excuse moi les fautes, il m'a fallu des mois pour retrouver comment faire.
perte équilibré, difficulté à trouver quel nerf commande quel muscle c'est très chiant, réeduc, douleurs terribles et j'en passe.
donc j'ai été absent 1 ou 2 ou 3 ans je sais pas trop.
je devais m'appeler ximtou ou bdragon un truc comme ça je voudrais pas jurer

J'ai du mal de me souvenir, ça revient mais pas vite.

bref
chui pas la pour raconter ma vie de m

je n'ai pas de répertoire arduino 15
je ne trouve nul part ce string.h, j'ai lancé une recherche et niet

sur googlx non plus.

j'ai voulu installer ide arduino 1.8.19 mais j'ai linux, impossible de l'installer, j'ai cherché partout rien ne fonctionne. Je n’achèterai pas windows.

et puis je ne peux pas rester très longtemps devant l'écran ça me fatigue encore bcp.
et cette ptn de morphine m’empêche de réfléchir .

j'ai acheté une sorte de voiture pour mes ptits fils et car tu vois, je veux qu'ils apprennent à comprendre la programmation. mais je ne trouve pas le script qui va bien0.

je te met le zip que j'ai récupéré avec bien du mal.

-OPEN-SMART- 4WD Smart Car 06.zip (356,7 Ko)

2022-02-19-230304_1

hummmmm c'ests curieux ce script fonctionne


#include <String.h>
#include "MotorDriver.h"

#include <IRremote.h>
#include <OS_Buzzer.h>

#define BUZZER_PIN A0          //buzzer connect to A0 of Arduino
Buzzer buzzer(BUZZER_PIN);


#define CTRL_INVALID     0XFF
#define CMD_FORWARD     'F'
#define CMD_RIGHT_FRONT 'R'

#define CMD_BACKWARD    'B'

#define CMD_LEFT_FRONT  'L'
#define CMD_STOP        'S'

#define RECV_PIN 2
IRrecv IR(RECV_PIN);

#define SPEED_STEPS 20
uint8_t speed0 = 100;
void setup(){

  motordriver.init();
  motordriver.setSpeed(100,MOTORA);
  motordriver.setSpeed(100,MOTORB);

  IR.enableIRIn(); // Start the receiver
}
uint8_t bt_command;

#define CAR_STOP 0
#define CAR_FORWARD 1
#define CAR_BACK 2
uint8_t car_status = CAR_STOP;
uint8_t new_status = car_status;

void loop(){
  
  Serial.print("toto");
  
  if (IR.decode()) {//If decode is valid

    if(IR.isReleased())//
	{
	  buzzer.on();//every time you press the key, the buzzer will beep
      delay(100);   //buzzer beep for 100ms
	  switch(IR.keycode)
	  {
	    case KEY_ZERO:  bt_command = '0';break;
		case KEY_ONE:   bt_command = '1';break;
		case KEY_TWO:   bt_command = '2';break;
		case KEY_THREE: bt_command = '3';break;
		case KEY_FOUR:  bt_command = '4';break;
		case KEY_FIVE:  bt_command = '5';break;
		case KEY_SIX:   bt_command = '6';break;
		case KEY_SEVEN: bt_command = '7';break;
		case KEY_EIGHT: bt_command = '8';break;
		case KEY_NINE:  bt_command = '9';break;
		case KEY_PLUS:  bt_command = CMD_FORWARD;break;
		case KEY_MINUS: bt_command = CMD_BACKWARD;break;
		case KEY_PREV:  bt_command = CMD_LEFT_FRONT;break;
		case KEY_NEXT:  bt_command = CMD_RIGHT_FRONT;break;
		case KEY_PLAY:  bt_command = CMD_STOP;break;
		default: break;
	  }
	  buzzer.off(); //turn off the buzzer
    }
    IR.resume(); // Receive the next value
  	}
    controlCar(bt_command);
	bt_command = 0XFF;
}


void controlCar(uint8_t cmd){
   
   switch(cmd)
  {
    case CMD_FORWARD:     new_status = CAR_FORWARD; break;
	case CMD_RIGHT_FRONT: 
		if(car_status != CAR_STOP)new_status = CAR_FORWARD;
		motordriver.goRight();
		delay(200); 
		break;
	case CMD_BACKWARD:    new_status = CAR_BACK; break;
	case CMD_LEFT_FRONT:  
		if(car_status != CAR_STOP)new_status = CAR_FORWARD;
		motordriver.goLeft();
		delay(200);
		break;
	case CMD_STOP:        new_status = CAR_STOP;break;
	default: break;
  }
  switch(new_status)
  {
    case CAR_STOP: motordriver.stop();break;
	case CAR_FORWARD: motordriver.goForward();break;
	case CAR_BACK: motordriver.goBackward();break;
	default: break;
  }
  car_status = new_status;
  if((cmd>='0')&&(cmd<='9'))
  {
  	speed0 = cmd-0x30;
	speed0 = map(speed0, 0, 9, 0, 255);
	motordriver.setSpeed(speed0,MOTORA);
    motordriver.setSpeed(speed0,MOTORB);
  }
}

void speedUp(){
  if(speed0 < 236)speed0 += SPEED_STEPS;
  else speed0 = 255;
  motordriver.setSpeed(speed0,MOTORA);
  motordriver.setSpeed(speed0,MOTORB);
}

void speedDown(){
  if(speed0 > 70)speed0 -= SPEED_STEPS;
  else speed0 = 50;
   motordriver.setSpeed(speed0,MOTORA);
  motordriver.setSpeed(speed0,MOTORB);
}

Sous Linux : .arduino15, dans ton dossier perso (afficher les fichiers cachés).

Idem, 1.8.19, installé à partir d'ici : https://www.arduino.cc/en/software

Ne pas confondre String.h et string.h.
fais une recherche dans .arduino15 :
find .arduino15 -name string.h

je reviens plus tard, chui trop fatigué. merci beaucoup
oui s et S c'est pas idem !

a+

je me suis remis sur le truc
ET
alors ne me demandez pas pourquoi : ça marche !

j'ai réussi avec une connnnnnn..... de droit d'écriture sur port usb par l'ide arduino ! c'est linux en même temps.

mais je vais continuer mes investigations pour cette histoire bizarre de string ou String.h
qui me plantait et qui soudain est passé ...
et je reviendrais vers vous très vite.

de plus ce script je vais faire gamberger les gamins pour ajouter des fonctions . phares clignotants , bip de recul, il me reste des grenades en plâtres et ...ha non madame n'est pas d'accord pour les grenades. on peut même plus rire.

D’aileurs si t'as des idées pour une cam qui reviendrait sur la tablette ça pourrait être amusant en augmentant la portée

si t'as des idées je suis preneur

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.