<?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=30&amp;t=6470&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2014-03-25T22:36:28+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=30&amp;t=6470&amp;mode</id>
<entry>
<author><name><![CDATA[stachu]]></name></author>
<updated>2014-03-25T22:36:28+01:00</updated>
<published>2014-03-25T22:36:28+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75783#p75783</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75783#p75783"/>
<title type="html"><![CDATA[Re: przerobienie kodu arduino]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75783#p75783"><![CDATA[
Jak masy MSP-ka nie potrzebujesz takich zabaw tylko możesz pisać normalnie <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br />Bo w launchpadzie masz ultra low power procki <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /><br /><br />Pozdrawiam<br /><br />Zajrzyj do noty ile biorą <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":)" title="Szczęśliwy" /> za to je kocham <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=72">stachu</a> — 25 mar 2014, o 22:36</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[MrDarkenRahl]]></name></author>
<updated>2014-03-24T18:36:16+01:00</updated>
<published>2014-03-24T18:36:16+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75592#p75592</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75592#p75592"/>
<title type="html"><![CDATA[Re: przerobienie kodu arduino]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75592#p75592"><![CDATA[
Problemem jest sama biblioteka - środowisko Energia w którym można programować MSP430 jest bliźniacze do arduino, tzn można używać tych samej składni itd. Jednak załączona biblioteka jest dla AVRów, a nie wiem jak napisać to bez niej.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=636">MrDarkenRahl</a> — 24 mar 2014, o 18:36</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[xor]]></name></author>
<updated>2014-03-24T12:32:16+01:00</updated>
<published>2014-03-24T12:32:16+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75553#p75553</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75553#p75553"/>
<title type="html"><![CDATA[Re: przerobienie kodu arduino]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75553#p75553"><![CDATA[
No niestety problem chyba nie leży w tym, że to Arduino tylko że to całkiem inna platforma. Jak widać nawet po nazwie &quot;avr/sleep.h&quot; biblioteka jest specyficzna dla sprzętu, w tym przypadku AVR.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1774">xor</a> — 24 mar 2014, o 12:32</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[MrDarkenRahl]]></name></author>
<updated>2014-03-23T22:51:52+01:00</updated>
<published>2014-03-23T22:51:52+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75498#p75498</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75498#p75498"/>
<title type="html"><![CDATA[przerobienie kodu arduino]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6470&amp;p=75498#p75498"><![CDATA[
Witam. Znalazłem w sieci taki kod:<br />[syntax=c]#include &lt;avr/sleep.h&gt;<br /><br />#define sync_pin 2 //power button repurposed for sync button (pin 5 on the module)<br />#define data_pin 3 //data line (pin 6 on the module)<br />#define clock_pin 4 //clock line (pin 7 on module) <br /><br />int led_cmd&#91;10&#93; =  {0,0,1,0,0,0,0,1,0,0}; //Activates/initialises the LEDs, leaving the center LED lit.<br />int anim_cmd&#91;10&#93; = {0,0,1,0,0,0,0,1,0,1}; //Makes the startup animation on the ring of light.<br />int sync_cmd&#91;10&#93; = {0,0,0,0,0,0,0,1,0,0}; //Initiates the sync process.<br />volatile boolean sync_enable = 0;<br /><br />void sendData(int cmd_do&#91;&#93;) {<br />  pinMode(data_pin, OUTPUT);<br />  digitalWrite(data_pin, LOW);    //start sending data.<br />  int prev = 1;<br />  for(int i = 0; i &lt; 10; i++){<br /><br />    while (prev == digitalRead(clock_pin)){} //detects change in clock<br />    prev = digitalRead(clock_pin);<br />      // should be after downward edge of clock, so send bit of data now<br />    digitalWrite(data_pin, cmd_do&#91;i&#93;);<br /><br />    while (prev == digitalRead(clock_pin)){} //detects upward edge of clock<br />    prev = digitalRead(clock_pin);<br />  }<br />  digitalWrite(data_pin, HIGH);<br />  pinMode(data_pin, INPUT);<br />}<br /><br />void initLEDs(){<br />sendData(led_cmd);<br />delay(50);<br />sendData(anim_cmd);<br />delay(50);<br />}<br /><br />void wakeUp(){<br />  sync_enable = 1;<br />}<br /><br />void sleepNow() {<br />  set_sleep_mode(SLEEP_MODE_PWR_DOWN); // set sleep mode<br />  sleep_enable(); //enable sleep bit<br />  attachInterrupt(0, wakeUp, LOW);<br />  sleep_mode();<br />  sleep_disable(); //disable sleep bit<br />  detachInterrupt(0); // disables interrupt 0 on pin 2<br />}<br /><br />void setup() {<br />  Serial.begin(9600);<br />  pinMode(sync_pin, INPUT);<br />  digitalWrite(sync_pin,HIGH);<br />  pinMode(data_pin, INPUT);<br />  pinMode(clock_pin, INPUT);<br />  delay(2000);<br /><br />  initLEDs();<br />//  sendData(sync_cmd);<br />}<br /><br />void loop(){<br />  Serial.println(&quot;Sleeping.&quot;);<br />  sleepNow();<br />  delay(200);<br />  if(sync_enable==1) {<br />    Serial.println(&quot;Syncing.&quot;);<br />    sendData(sync_cmd);<br />    sync_enable = 0;<br />  }<br />}[/syntax]<br />Niestety nie mam arduino. Mam MSP430, ale on ma problemy z dołączaną biblioteką. Czy ktoś mógłby prosze to &quot;przepisać&quot; na składnię zjadliwą dla MSP430? Będę bardzo wdzięczny za pomoc.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=636">MrDarkenRahl</a> — 23 mar 2014, o 22:51</p><hr />
]]></content>
</entry>
</feed>