<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=47&amp;t=14488&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2016-02-11T10:12:08+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=47&amp;t=14488&amp;mode</id>
<entry>
<author><name><![CDATA[rskup]]></name></author>
<updated>2016-02-11T10:12:08+01:00</updated>
<published>2016-02-11T10:12:08+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153330#p153330</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153330#p153330"/>
<title type="html"><![CDATA[Re: Błąd przy dodawaniu biblioteki &lt;Servo.h&gt;]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153330#p153330"><![CDATA[
Masz napisane w błędzie. Wykorzystujesz to samo przerwanie w dwóch bibliotekach Servo.cpp (dodane przez #include &lt;Servo.h&gt;) i w RH_ASK.cpp (pewnie dodane poprzez #include &lt;RH_NRF24.h&gt;).<br /><br />-- <br />Pozdrawiam,<br />Robert<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3427">rskup</a> — 11 lut 2016, o 10:12</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Marhef]]></name></author>
<updated>2016-02-11T08:35:19+01:00</updated>
<published>2016-02-11T08:35:19+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153320#p153320</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153320#p153320"/>
<title type="html"><![CDATA[Re: Błąd przy dodawaniu biblioteki &lt;Servo.h&gt;]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153320#p153320"><![CDATA[
Chyba dwie biblioteki korzystają z tych samych zasobów mikrokontrolera. Albo masz coś nie tak z biblioteką<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=12752">Marhef</a> — 11 lut 2016, o 08:35</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Bartek123]]></name></author>
<updated>2016-02-11T02:43:43+01:00</updated>
<published>2016-02-11T02:43:43+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153316#p153316</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153316#p153316"/>
<title type="html"><![CDATA[Re: Błąd przy dodawaniu biblioteki &lt;Servo.h&gt;]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153316#p153316"><![CDATA[
Poprawnie wstaw kod i usuń któryś z tematów, bo je zdublowałeś.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=10617">Bartek123</a> — 11 lut 2016, o 02:43</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maniekvw]]></name></author>
<updated>2016-02-11T02:05:04+01:00</updated>
<published>2016-02-11T02:05:04+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153311#p153311</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153311#p153311"/>
<title type="html"><![CDATA[Błąd przy dodawaniu biblioteki &lt;Servo.h&gt;]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=14488&amp;p=153311#p153311"><![CDATA[
Witam !<br /><br />mam problem z dodaniem biblioteki &lt;Servo.h&gt; do mojego projektu poniżej szkic <br /><br /><span style="color: #FF0000">[ proszę poprawić kod zgodnie z instrukcją: <!-- l --><a class="postlink-local" href="http://forum.atnel.pl/topic7402.html" >topic7402.html</a><!-- l --> bo inaczej wątek zostanie usunięty - mirekk36 ]</span><br /><br />błąd :<br /><br />libraries\Servo\avr\Servo.cpp.o: In function `__vector_11':<br /><br />C:\Program Files (x86)\Arduino\libraries\Servo\src\avr/Servo.cpp:81: multiple definition of `__vector_11'<br /><br />libraries\RadioHead\RH_ASK.cpp.o:C:\Users\Anetka\Documents\Arduino\libraries\RadioHead/RH_ASK.cpp:514: first defined here<br /><br />collect2.exe: error: ld returned 1 exit status<br /><br /><br />szkic :<br />D0 <br />D1 <br />D2 <br />D3 PWMA Silnik<br />D4 LED Pin<br />D5 PWMA Silnik<br />D6 AIN1<br />D7 AIN2<br />D8 NRF24 CE<br />D9 <br />D10 NRF24 CSN<br />D11 NRF24 MOSI<br />D12 NRF24 MISO<br />D13 NRF24 SCK<br />A0 <br />A1 <br />A2 <br />A3 <br />A4 <br />A5 <br />*/<br /><br />// This section describes the vehicle (this ID is JD83)<br />byte ID1 = 0x4A; // Enter a four byte ID for the vehicle<br />byte ID2 = 0x44; // for example F936 for the Fendt 936 model<br />byte ID3 = 0x38; // would be ID1 = 0x46; ID2 = 0x39; ID3 = 0x33; ID4 = 0x36<br />byte ID4 = 0x33; // because asci character F is 46 in hexidecimal and so on<br /><br />// Variables used in the program<br />int Move_1 = 125;<br />int Move_2 = 125;<br />int Move_3 = 125;// Variable used to determine the motor direction<br />byte Command_Val = 0x00; // Stores the command value<br />byte Data_Val_1 = 0x00; // Stores the data value<br />byte Data_Val_2 = 0x00; // Stores the data value<br />byte Data_Val_3 = 0x00; // Stores the data value<br />byte Data_Val_4 = 0x00; // Stores the data value<br />byte Data_Val_5 = 0x00; // Stores the data value<br />byte Data_Val_6 = 0x00; // Stores the data value<br /><br />// Include Libraries<br />#include &lt;SPI.h&gt; <br />#include &lt;RH_NRF24.h&gt;<br /><br /><br /><br /><br /><br />RH_NRF24 nrf24; // Create NRF24 object<br /><br />void setup() <br />{<br />pinMode(4, OUTPUT); // Set digital pin 4 as an output<br /><br />nrf24.init(); // Initiailize NRF24 radio module<br />nrf24.setChannel(1); // Defaults after init are 2.402 GHz (channel 2), 2Mbps, 0dBm<br />nrf24.setRF(RH_NRF24::DataRate2Mbps, RH_NRF24::TransmitPower0dBm);<br />}<br /><br />void loop()<br />{<br />if (nrf24.available()) // If the NRF24 has recieved data<br />{<br />uint8_t buf[11]; // Create array to store it in<br />uint8_t len = sizeof(buf); <br />if (nrf24.recv(buf, &amp;len)) // Store the data<br />{ <br />// We recieved a string of ten bytes, four ID, one command and six data values but they may not be for this tractor<br />if (buf[0] == ID1 &amp;&amp; buf[1] == ID2 &amp;&amp; buf[2] == ID3 &amp;&amp; buf[3] == ID4){ // Confirm that the correct vehicle ID has been recieved<br />Command_Val = buf[4]; // Store the new command value<br />Data_Val_1 = buf[5]; // Store the new data value<br />Data_Val_2 = buf[6]; // Store the new data value<br />Data_Val_3 = buf[7]; // Store the new data value<br />Data_Val_4 = buf[8]; // Store the new data value<br />Data_Val_5 = buf[9]; // Store the new data value<br />Data_Val_6 = buf[10]; // Store the new data value<br />}<br /><br />}<br /><br />// Servo not simple, NRF24 and servo libraries trying to use the same timer <br /><br />// Motor Control<br />// Data recieved is between 0 and 255. The center is 255/2=127.5 and we want a buffer zone around here to stop the tractor from moving unexpectedly.<br />if (Data_Val_5 &lt; 120){ // This if function create a buffer zone of 7.5 bits below 127.5<br />Move_1 = map(Data_Val_5, 120, 0, 0,255); // PWM is 0% at 0 and 100% at 255 so scale the data value for use with the motor<br />analogWrite(5,Move_1); // Set the PWM value on pin 5 to move the motor<br /><br />}<br />else if (Data_Val_5 &gt; 135){ // This if function create a buffer zone of 7.5 bits above 127.5<br />Move_1 = map(Data_Val_5, 5, 0, 0,0); // PWM is 0% at 0 and 100% at 255 so scale the data value for use with the motor<br />analogWrite(5,Move_1); // Set the PWM vlue on pin 5 to move the motor<br /> <br /><br />}<br />else{ // Every other value is in the buffer zone<br />Move_1=0; <br />analogWrite(5,Move_1); // Set the PWM to 0%<br /> // Set the direction with pins 6 and 7 but not necessary<br /><br />}<br />/////////////////////////////////////////////<br />// Motor Control<br />// Data recieved is between 0 and 255. The center is 255/2=127.5 and we want a buffer zone around here to stop the tractor from moving unexpectedly.<br />if (Data_Val_5 &lt; 120){ // This if function create a buffer zone of 7.5 bits below 127.5<br />Move_2 = map(Data_Val_5, 5, 0, 0,0); // PWM is 0% at 0 and 100% at 255 so scale the data value for use with the motor<br />analogWrite(3,Move_2); // Set the PWM value on pin 5 to move the motor<br /> <br />}<br />else if (Data_Val_5 &gt; 135){ // This if function create a buffer zone of 7.5 bits above 127.5<br />Move_2 = map(Data_Val_5, 120, 255, 0,255); // PWM is 0% at 0 and 100% at 255 so scale the data value for use with the motor<br />analogWrite(3,Move_2); // Set the PWM vlue on pin 5 to move the motor<br /><br /><br />}<br />else{ // Every other value is in the buffer zone<br />Move_2=0; <br />analogWrite(3,Move_2); // Set the PWM to 0%<br /><br />}<br />////////////////////////SERVO//////////////////////////////<br /><br /><br /><br />// LED Control<br />if(Data_Val_6==1){ <br />digitalWrite(4, HIGH); // Turn LED on<br />}<br />else {<br />digitalWrite(4, LOW); // Turn LED off<br />}<br />}<br />}<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=12947">maniekvw</a> — 11 lut 2016, o 02:05</p><hr />
]]></content>
</entry>
</feed>