<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Electronics on csegura</title><link>http://blog.romheat.net/tags/electronics/</link><description>Recent content in Electronics on csegura</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 25 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="http://blog.romheat.net/tags/electronics/index.xml" rel="self" type="application/rss+xml"/><item><title>Changing the SGI Octane’s Light-Bar LEDs</title><link>http://blog.romheat.net/posts/2026/26_10_25_changing_the_sgi_octanes_light_bar_leds/</link><pubDate>Sun, 25 Oct 2026 00:00:00 +0000</pubDate><guid>http://blog.romheat.net/posts/2026/26_10_25_changing_the_sgi_octanes_light_bar_leds/</guid><description>&lt;h2 id="a-small-change-to-an-sgi-workstation">A small change to an SGI workstation&lt;/h2>
&lt;p>I changed the indicator LEDs in my SGI Octane’s light bar. I chose blue LEDs and added two resistors to keep their current within a safe range.&lt;/p>
&lt;p>The light bar is a narrow assembly in the front of the case. Its lights make the computer’s status visible from the outside. I wanted to replace the dead lights and give them a blue glow.&lt;/p></description></item><item><title>NorthStar Advantage Restoration Part 1</title><link>http://blog.romheat.net/posts/2026/26_10_25_northstar_advantage_restoration_1_first_look_inside/</link><pubDate>Sun, 25 Oct 2026 00:00:00 +0000</pubDate><guid>http://blog.romheat.net/posts/2026/26_10_25_northstar_advantage_restoration_1_first_look_inside/</guid><description>&lt;h2 id="a-restoration-that-took-more-than-a-year">A restoration that took more than a year&lt;/h2>
&lt;p>I bought this NorthStar Advantage on Wallapop in 2024. The seller told me that the keyboard had a fault. But at power-on, the computer still displayed a message on the screen. As always trust in the seller’s words, was an act of faith.&lt;/p>
&lt;p>Indeed, buying vintage computers is always a bit of a gamble but be prepared for surprises when dealing with vintage hardware.&lt;/p></description></item><item><title>Fixing Sharp MZ-700</title><link>http://blog.romheat.net/posts/2024/24_08_23_sharp_mz700/</link><pubDate>Fri, 23 Aug 2024 00:00:00 +0000</pubDate><guid>http://blog.romheat.net/posts/2024/24_08_23_sharp_mz700/</guid><description>&lt;h2 id="fixing-sharp-mz-700">Fixing Sharp MZ-700&lt;/h2>
&lt;p>Time to fix the Sharp MZ-700, I have this computer for a while, and it was not working. I decided to fix it. I opened the computer and I found that the power supply was not working correctly. I decided to do the standard procedure, replaced suspects capacitors and voltage regulators. Here are some pictures of the process:&lt;/p>
&lt;p>&lt;img src="https://imgur.com/zv4n4jm.jpg" alt="MZ700">&lt;/p>
&lt;p>This machine was manufactured in 1982, and it was a very popular computer in Japan. It was used in schools and homes. It has a Z80 CPU, 16KB of RAM, and 16KB of ROM. It has a built-in tape recorder, and it can display 40x24 characters in 8 colors.&lt;/p></description></item><item><title>ISA-PicoMem</title><link>http://blog.romheat.net/posts/2024/24_06_05_isapicomem/</link><pubDate>Wed, 05 Jun 2024 00:00:00 +0000</pubDate><guid>http://blog.romheat.net/posts/2024/24_06_05_isapicomem/</guid><description>&lt;p>I&amp;rsquo;m restoring this wonderful IBM XT 5150, machine powered up, but there wasn&amp;rsquo;t os. Floppy drive was`t working, I tried to boot from a 720k floppy disk, but it was impossible. So looking for a solution, I found a ISA-PicoMem (&lt;a href="https://github.com/FreddyVRetro/ISA-PicoMEM/tree/main" target="_blank">https://github.com/FreddyVRetro/ISA-PicoMEM/tree/main&lt;/a>) card, a wonderful card that allows you to boot from a SD card, add memory, and is able to connect to a network using wifi and ne2000 drivers, of course you need install mTCP.&lt;/p></description></item><item><title>Connecting a Z80 to a Raspberry Pi</title><link>http://blog.romheat.net/posts/2024/24_03_18_z80_pi/</link><pubDate>Mon, 18 Mar 2024 00:00:00 +0000</pubDate><guid>http://blog.romheat.net/posts/2024/24_03_18_z80_pi/</guid><description>&lt;p>I have a long history with computers, starting with a Sinclair Zx81 that I still own, followed by other models and others that I wished for, as time went by.&lt;/p>
&lt;p>A while back, I found an old box with some old processors, x386, x486, a few Pentiums first generation and two Zilog Z80. Then I got a kind of retro-feeling in my mind and I watched some YouTube videos about them. One of them was the classic nop-test, I had fun with this for a whole afternoon.&lt;/p></description></item><item><title>Fixing Dragon 32 Power supply</title><link>http://blog.romheat.net/posts/2024/24_03_16_dragon_power_supply/</link><pubDate>Sat, 16 Mar 2024 00:00:00 +0000</pubDate><guid>http://blog.romheat.net/posts/2024/24_03_16_dragon_power_supply/</guid><description>&lt;p>This morning the Dragon 32 power supply broke. I have a Dragon 32 that I bought one time ago. But when I tried to turn it on, it didn&amp;rsquo;t work. I checked the power circuit inside of the Dragon 32 and found that the regulator was broken.&lt;/p>
&lt;p>It was a LM340T 7812, 12v regulator, so I replaced it with a new one. But when I tried to turn it on, it didn&amp;rsquo;t work.&lt;/p></description></item><item><title>Arduino car</title><link>http://blog.romheat.net/posts/2011/11_01_01_coche_arduino/</link><pubDate>Tue, 01 Nov 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_01_01_coche_arduino/</guid><description>&lt;p>I have been working on a project that involves controlling a car with an Arduino board. The car is made of a chassis, two motors, and a battery. The motors are connected to the Arduino board through a motor driver, which allows the Arduino to control the speed and direction of the motors using a wii nunchuck as a remote control.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#include&lt;/span> &lt;span style="color:#75715e">&amp;lt;math.h&amp;gt;&lt;/span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#include&lt;/span> &lt;span style="color:#75715e">&amp;#34;Wire.h&amp;#34;&lt;/span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#include&lt;/span> &lt;span style="color:#75715e">&amp;#34;WiiChuck.h&amp;#34;&lt;/span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#include&lt;/span> &lt;span style="color:#75715e">&amp;lt;Servo.h&amp;gt;&lt;/span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#include&lt;/span> &lt;span style="color:#75715e">&amp;lt;RHMotor.h&amp;gt;&lt;/span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>WiiChuck chuck &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">WiiChuck&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">int&lt;/span> joyX &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">int&lt;/span> joyY &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#define MOVING_MARGIN 50
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#define ROTATE_MARGIN 50
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">int&lt;/span> left_motor_pin &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">7&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">int&lt;/span> right_motor_pin &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">6&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RHMotor &lt;span style="color:#a6e22e">motor&lt;/span>(left_motor_pin, right_motor_pin);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">setup&lt;/span>()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">begin&lt;/span>(&lt;span style="color:#ae81ff">9600&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">flush&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Initialize chuck engine.&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> chuck.&lt;span style="color:#a6e22e">begin&lt;/span>(&lt;span style="color:#ae81ff">1000&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> chuck.&lt;span style="color:#a6e22e">update&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">delay&lt;/span>(&lt;span style="color:#ae81ff">1000&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Completed.&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Initialize motor engine.&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> motor.&lt;span style="color:#a6e22e">start&lt;/span>(&lt;span style="color:#ae81ff">300&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">delay&lt;/span>(&lt;span style="color:#ae81ff">1000&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> motor.&lt;span style="color:#a6e22e">stop&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Completed.&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">loop&lt;/span>()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> chuck.&lt;span style="color:#a6e22e">update&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> joyX &lt;span style="color:#f92672">=&lt;/span> chuck.&lt;span style="color:#a6e22e">readJoyX&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> joyY &lt;span style="color:#f92672">=&lt;/span> chuck.&lt;span style="color:#a6e22e">readJoyY&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">//Serial.print(joyX);
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#75715e">//Serial.print(&amp;#34; &amp;#34;);
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#75715e">//Serial.print(joyY);
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#75715e">//Serial.println();
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">millis&lt;/span>()&lt;span style="color:#f92672">%&lt;/span>&lt;span style="color:#ae81ff">1000&lt;/span> &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;.&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (chuck.&lt;span style="color:#a6e22e">zPress&lt;/span>() &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Z Pressed&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> motor.&lt;span style="color:#a6e22e">stop&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (joyY &lt;span style="color:#f92672">&amp;gt;&lt;/span> MOVING_MARGIN) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Fwd&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> motor.&lt;span style="color:#a6e22e">forward&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> } &lt;span style="color:#66d9ef">else&lt;/span> &lt;span style="color:#66d9ef">if&lt;/span> (joyY &lt;span style="color:#f92672">&amp;lt;&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>&lt;span style="color:#f92672">-&lt;/span>MOVING_MARGIN) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Bwd&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> motor.&lt;span style="color:#a6e22e">backward&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (joyX &lt;span style="color:#f92672">&amp;gt;&lt;/span> ROTATE_MARGIN){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Right&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> motor.&lt;span style="color:#a6e22e">right&lt;/span>(&lt;span style="color:#ae81ff">300&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> } &lt;span style="color:#66d9ef">else&lt;/span> &lt;span style="color:#66d9ef">if&lt;/span> (joyX &lt;span style="color:#f92672">&amp;lt;&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>&lt;span style="color:#f92672">-&lt;/span>ROTATE_MARGIN) { 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Left&amp;#34;&lt;/span>); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> motor.&lt;span style="color:#a6e22e">left&lt;/span>(&lt;span style="color:#ae81ff">300&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (chuck.&lt;span style="color:#a6e22e">cPress&lt;/span>()) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">int&lt;/span> left &lt;span style="color:#f92672">=&lt;/span> motor.&lt;span style="color:#a6e22e">getLeftServo&lt;/span>().&lt;span style="color:#a6e22e">readMicroseconds&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">int&lt;/span> right &lt;span style="color:#f92672">=&lt;/span> motor.&lt;span style="color:#a6e22e">getRightServo&lt;/span>().&lt;span style="color:#a6e22e">readMicroseconds&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(left);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(&lt;span style="color:#e6db74">&amp;#34; &amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(right);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> joyX &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> joyY &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">delay&lt;/span>(&lt;span style="color:#ae81ff">20&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This is a sort video of the car in action:&lt;/p></description></item><item><title>Servo calibration</title><link>http://blog.romheat.net/posts/2011/11_01_01_servo_calibration/</link><pubDate>Tue, 01 Nov 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_01_01_servo_calibration/</guid><description>&lt;p>Este experimento es para tratar de calibrar los servos que se van a usar como motores.&lt;/p>
&lt;p>Este paso es importante ya que hay que encontrar el punto en el que el servo queda detenido.&lt;/p>
&lt;p>Material -Un servo de rotación continua&lt;/p>
&lt;p>Conexiones - Usar para el servo una salida con PWM&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#include&lt;/span> &lt;span style="color:#75715e">&amp;lt;Servo.h&amp;gt;&lt;/span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#define SERVO_PIN 6
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Servo servo;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">int&lt;/span> velocity;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">setup&lt;/span>()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">begin&lt;/span>(&lt;span style="color:#ae81ff">9600&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">flush&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// Initialize
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> velocity &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> servo.&lt;span style="color:#a6e22e">attach&lt;/span>(SERVO_PIN);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">loop&lt;/span>()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// commands
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#66d9ef">if&lt;/span> ( Serial.&lt;span style="color:#a6e22e">available&lt;/span>()) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">char&lt;/span> ch &lt;span style="color:#f92672">=&lt;/span> Serial.&lt;span style="color:#a6e22e">read&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">switch&lt;/span>(ch) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">case&lt;/span> &lt;span style="color:#e6db74">&amp;#39;s&amp;#39;&lt;/span>&lt;span style="color:#f92672">:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> servo.&lt;span style="color:#a6e22e">write&lt;/span>(&lt;span style="color:#ae81ff">0&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> servo.&lt;span style="color:#a6e22e">write&lt;/span>(velocity);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">case&lt;/span> &lt;span style="color:#e6db74">&amp;#39;a&amp;#39;&lt;/span>&lt;span style="color:#f92672">:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> velocity &lt;span style="color:#f92672">+=&lt;/span> &lt;span style="color:#ae81ff">10&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>; 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">case&lt;/span> &lt;span style="color:#e6db74">&amp;#39;d&amp;#39;&lt;/span>&lt;span style="color:#f92672">:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> velocity &lt;span style="color:#f92672">-=&lt;/span> &lt;span style="color:#ae81ff">10&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>; 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">case&lt;/span> &lt;span style="color:#e6db74">&amp;#39;z&amp;#39;&lt;/span>&lt;span style="color:#f92672">:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> velocity &lt;span style="color:#f92672">+=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>; 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">case&lt;/span> &lt;span style="color:#e6db74">&amp;#39;x&amp;#39;&lt;/span>&lt;span style="color:#f92672">:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> velocity &lt;span style="color:#f92672">-=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>; 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">case&lt;/span> &lt;span style="color:#e6db74">&amp;#39;f&amp;#39;&lt;/span>&lt;span style="color:#f92672">:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> servo.&lt;span style="color:#a6e22e">detach&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> servo.&lt;span style="color:#a6e22e">attach&lt;/span>(SERVO_PIN);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">case&lt;/span> &lt;span style="color:#e6db74">&amp;#39;q&amp;#39;&lt;/span>&lt;span style="color:#f92672">:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> velocity &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> servo.&lt;span style="color:#a6e22e">write&lt;/span>(velocity);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">case&lt;/span> &lt;span style="color:#e6db74">&amp;#39;w&amp;#39;&lt;/span>&lt;span style="color:#f92672">:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> velocity &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">90&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> servo.&lt;span style="color:#a6e22e">write&lt;/span>(velocity);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">case&lt;/span> &lt;span style="color:#e6db74">&amp;#39;e&amp;#39;&lt;/span>&lt;span style="color:#f92672">:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> velocity &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">180&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> servo.&lt;span style="color:#a6e22e">write&lt;/span>(velocity);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>; 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;&amp;gt; &amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(ch);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(&lt;span style="color:#e6db74">&amp;#34; &amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(velocity);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(&lt;span style="color:#e6db74">&amp;#34; &amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(servo.&lt;span style="color:#a6e22e">readMicroseconds&lt;/span>());
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Resultados
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Servo A
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Stop &lt;span style="color:#ae81ff">86&lt;/span> (momento en que el servo deja de meter ruidito)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Servo B
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Stop &lt;span style="color:#ae81ff">83&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>GPS Arduino</title><link>http://blog.romheat.net/posts/2011/11_04_05.gps_arduino/</link><pubDate>Tue, 05 Apr 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_04_05.gps_arduino/</guid><description>&lt;p>La cosa es que en cierta ocasión había abierto este GPS y me había llamado la atención los agujeritos de conexión que hay dentro, de modo que me puse a buscar información al respecto y di con esta página (de un tal xam) en la que vi una foto en donde se actualizaba el software por medio de los agujeritos…
&lt;a href="http://xamweb2.dyndns.org/wordpress/2008/02/20/fortuna-clipon-flashing/" target="_blank">http://xamweb2.dyndns.org/wordpress/2008/02/20/fortuna-clipon-flashing/&lt;/a>
&lt;a href="http://xamweb2.dyndns.org/wordpress/2007/09/20/innenleben-von-sirf2-gps-mausen-2/" target="_blank">http://xamweb2.dyndns.org/wordpress/2007/09/20/innenleben-von-sirf2-gps-mausen-2/&lt;/a>&lt;/p>
&lt;p>Información&lt;/p>
&lt;p>Mi GPS es parecido al de la primera foto pero distin del de la segunda, en vez de tener 12 agujeritos tiene 7&lt;/p></description></item><item><title>C64 Arduino</title><link>http://blog.romheat.net/posts/2011/11_04_01_c64_arduino/</link><pubDate>Fri, 01 Apr 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_04_01_c64_arduino/</guid><description>&lt;p>He intentado encontrar el código pero no hay forma ..&lt;/p>
&lt;p>&lt;img src="http://blog.romheat.net/images/Electronics/ac64_1.jpg" alt="">
&lt;img src="http://blog.romheat.net/images/Electronics/ac64_2.jpg" alt="">
&lt;img src="http://blog.romheat.net/images/Electronics/ac64_3.jpg" alt="">
&lt;img src="http://blog.romheat.net/images/Electronics/ac64_4.jpg" alt="">
&lt;img src="http://blog.romheat.net/images/Electronics/ac64_5.jpg" alt="">&lt;/p></description></item><item><title>Arduino LC24XX EPROM (paginated 2)</title><link>http://blog.romheat.net/posts/2011/11_03_04_arduino_lc24xx_paginated2/</link><pubDate>Fri, 04 Mar 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_03_04_arduino_lc24xx_paginated2/</guid><description>&lt;p>Finalmente he hecho una biblioteca I2C_eeprom.
Hay una parte que merece una explicación es el hecho de que estas memorias EEPROM tienen un modo de escritura más rápida (Page Write), en este modo podemos escribir 64bytes de golpe con lo que el proceso de escritura es considerablemente más rápido.
Este modo viene explicado en el datasheet de estas eeproms.
La cosa es que cuando he ido a implementarlo he tenido bastantes problemas.
Lo que he estado programando usa la biblioteca Wire, que a su vez usa unas funciones definidas en Wire\Utility\Twi.h (Two Wire Interface??)
Bien, tanto Wire como Twi usan un buffer interno de 32bytes, y el 24lc256 usa páginas internas de 64bytes, de modo que hay que ajustar estas dos bibliotecas para poder usar el método write_bytes_fast otra cosa importante es que este método no es capaz de saltar de dispositivo, así que estamos limitados a 32k, más que suficiente.
La segunda cosa es que los bloques de 64 bytes deben escribirse completamente, es decir que en cada operación no se pueden escribir ni más ni menos y deben escribirse en su sitio. En 32k hay 512 páginas de 64bytes.
Nota: para usar fast hay que modificar el tamaño del buffer en wire.h y twi.h pero en ambas hay que usar un buffer de 66Bytes, esto es debido a que el direccionamiento
previo son dos Bytes.&lt;/p></description></item><item><title>Arduino LC24XX EPROM</title><link>http://blog.romheat.net/posts/2011/11_03_03_arduinolc24xx_eprom/</link><pubDate>Thu, 03 Mar 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_03_03_arduinolc24xx_eprom/</guid><description>&lt;p>Código&lt;/p>
&lt;p>El código que amplia la biblioteca Wire para usar EEPROMs 24lcXX
&lt;a href="http://www.arduino.cc/playground/Code/I2CEEPROM" target="_blank">http://www.arduino.cc/playground/Code/I2CEEPROM&lt;/a>&lt;/p>
&lt;p>La biblioteca Wire
&lt;a href="http://arduino.cc/en/Reference/Wire" target="_blank">http://arduino.cc/en/Reference/Wire&lt;/a>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#include&lt;/span> &lt;span style="color:#75715e">&amp;lt;Wire.h&amp;gt;&lt;/span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">I2C_eeprom_write_byte&lt;/span>( &lt;span style="color:#66d9ef">int&lt;/span> deviceAddress, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">int&lt;/span> address, byte data )
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">int&lt;/span> rdata &lt;span style="color:#f92672">=&lt;/span> data;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">beginTransmission&lt;/span>(deviceAddress);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>((&lt;span style="color:#66d9ef">int&lt;/span>)(address &lt;span style="color:#f92672">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">8&lt;/span>)); &lt;span style="color:#75715e">// MSB
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>((&lt;span style="color:#66d9ef">int&lt;/span>)(address &lt;span style="color:#f92672">&amp;amp;&lt;/span> &lt;span style="color:#ae81ff">0xFF&lt;/span>)); &lt;span style="color:#75715e">// LSB
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>(rdata);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">endTransmission&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">delay&lt;/span>(&lt;span style="color:#ae81ff">10&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">I2C_eeprom_write_page&lt;/span>( &lt;span style="color:#66d9ef">int&lt;/span> deviceAddress, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">int&lt;/span> addressPage, byte&lt;span style="color:#f92672">*&lt;/span> data, byte length )
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">beginTransmission&lt;/span>(deviceAddress);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>((&lt;span style="color:#66d9ef">int&lt;/span>)(addressPage &lt;span style="color:#f92672">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">8&lt;/span>)); &lt;span style="color:#75715e">// MSB
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>((&lt;span style="color:#66d9ef">int&lt;/span>)(addressPage &lt;span style="color:#f92672">&amp;amp;&lt;/span> &lt;span style="color:#ae81ff">0xFF&lt;/span>)); &lt;span style="color:#75715e">// LSB
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> byte c;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> ( c &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>; c &lt;span style="color:#f92672">&amp;lt;&lt;/span> length; c&lt;span style="color:#f92672">++&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>(data[c]);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">endTransmission&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>byte &lt;span style="color:#a6e22e">I2C_eeprom_read_byte&lt;/span>( &lt;span style="color:#66d9ef">int&lt;/span> deviceAddress, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">int&lt;/span> address )
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> byte rdata &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0xFF&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">beginTransmission&lt;/span>(deviceAddress);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>((&lt;span style="color:#66d9ef">int&lt;/span>)(address &lt;span style="color:#f92672">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">8&lt;/span>)); &lt;span style="color:#75715e">// MSB
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>((&lt;span style="color:#66d9ef">int&lt;/span>)(address &lt;span style="color:#f92672">&amp;amp;&lt;/span> &lt;span style="color:#ae81ff">0xFF&lt;/span>)); &lt;span style="color:#75715e">// LSB
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> Wire.&lt;span style="color:#a6e22e">endTransmission&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">requestFrom&lt;/span>(deviceAddress,&lt;span style="color:#ae81ff">1&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (Wire.&lt;span style="color:#a6e22e">available&lt;/span>()) rdata &lt;span style="color:#f92672">=&lt;/span> Wire.&lt;span style="color:#a6e22e">receive&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> rdata;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">I2C_eeprom_read_buffer&lt;/span>( &lt;span style="color:#66d9ef">int&lt;/span> deviceAddress, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">int&lt;/span> address, byte &lt;span style="color:#f92672">*&lt;/span>buffer, &lt;span style="color:#66d9ef">int&lt;/span> length )
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">beginTransmission&lt;/span>(deviceAddress);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>((&lt;span style="color:#66d9ef">int&lt;/span>)(address &lt;span style="color:#f92672">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">8&lt;/span>)); &lt;span style="color:#75715e">// MSB
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> Wire.&lt;span style="color:#a6e22e">send&lt;/span>((&lt;span style="color:#66d9ef">int&lt;/span>)(address &lt;span style="color:#f92672">&amp;amp;&lt;/span> &lt;span style="color:#ae81ff">0xFF&lt;/span>)); &lt;span style="color:#75715e">// LSB
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> Wire.&lt;span style="color:#a6e22e">endTransmission&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">requestFrom&lt;/span>(deviceAddress,length);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">int&lt;/span> c &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> ( c &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>; c &lt;span style="color:#f92672">&amp;lt;&lt;/span> length; c&lt;span style="color:#f92672">++&lt;/span> )
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (Wire.&lt;span style="color:#a6e22e">available&lt;/span>()) buffer[c] &lt;span style="color:#f92672">=&lt;/span> Wire.&lt;span style="color:#a6e22e">receive&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>} 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">//*************************************************************************************************
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#66d9ef">static&lt;/span> &lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">DumpHex&lt;/span>(&lt;span style="color:#66d9ef">int&lt;/span> deviceAddress, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">long&lt;/span> startAddress, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">long&lt;/span> endAddress)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">int&lt;/span> value;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">int&lt;/span> lineCounter;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">char&lt;/span> textBuffer[&lt;span style="color:#ae81ff">24&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">long&lt;/span> address;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> lineCounter &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> address &lt;span style="color:#f92672">=&lt;/span> startAddress;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">while&lt;/span> (address &lt;span style="color:#f92672">&amp;lt;&lt;/span> endAddress)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">sprintf&lt;/span>(textBuffer, &lt;span style="color:#e6db74">&amp;#34;0x%05X - &amp;#34;&lt;/span>, address);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(textBuffer);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">sprintf&lt;/span>(textBuffer, &lt;span style="color:#e6db74">&amp;#34;0x%05X - &amp;#34;&lt;/span>, address &lt;span style="color:#f92672">+&lt;/span> (endAddress &lt;span style="color:#f92672">-&lt;/span> startAddress));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(textBuffer);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> textBuffer[&lt;span style="color:#ae81ff">0&lt;/span>] &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> (&lt;span style="color:#66d9ef">int&lt;/span> dumpCounter&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">0&lt;/span>; dumpCounter&lt;span style="color:#f92672">&amp;lt;&lt;/span>&lt;span style="color:#ae81ff">16&lt;/span>; dumpCounter&lt;span style="color:#f92672">++&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> value &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">I2C_eeprom_read_byte&lt;/span>(deviceAddress,address);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(value,HEX);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(&lt;span style="color:#e6db74">&amp;#34; &amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> ((value &lt;span style="color:#f92672">&amp;gt;=&lt;/span> &lt;span style="color:#ae81ff">0x20&lt;/span>) &lt;span style="color:#f92672">&amp;amp;&amp;amp;&lt;/span> (value &lt;span style="color:#f92672">&amp;lt;&lt;/span> &lt;span style="color:#ae81ff">0x7f&lt;/span>))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> textBuffer[dumpCounter &lt;span style="color:#f92672">%&lt;/span> &lt;span style="color:#ae81ff">16&lt;/span>] &lt;span style="color:#f92672">=&lt;/span> value;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">else&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> textBuffer[dumpCounter &lt;span style="color:#f92672">%&lt;/span> &lt;span style="color:#ae81ff">16&lt;/span>] &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#39;.&amp;#39;&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> address&lt;span style="color:#f92672">++&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> textBuffer[&lt;span style="color:#ae81ff">16&lt;/span>] &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>; 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(textBuffer); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">I2C_eeprom_delete&lt;/span>(&lt;span style="color:#66d9ef">int&lt;/span> deviceAddress, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">long&lt;/span> startAddress, &lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">long&lt;/span> endAddress)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{ 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span>(&lt;span style="color:#66d9ef">unsigned&lt;/span> &lt;span style="color:#66d9ef">long&lt;/span> address&lt;span style="color:#f92672">=&lt;/span>startAddress; address &lt;span style="color:#f92672">&amp;lt;&lt;/span> endAddress &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>; address&lt;span style="color:#f92672">++&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">I2C_eeprom_read_byte&lt;/span>(deviceAddress,address) &lt;span style="color:#f92672">!=&lt;/span> &lt;span style="color:#ae81ff">0xFF&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(address,HEX);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">I2C_eeprom_write_byte&lt;/span>(deviceAddress,address,&lt;span style="color:#ae81ff">0xFF&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#define EEPROM_DEVICE 0x50
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#define EEPROM_INIT 0x00000
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#define EEPROM_END 0x08000
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">setup&lt;/span>()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Wire.&lt;span style="color:#a6e22e">begin&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">begin&lt;/span>(&lt;span style="color:#ae81ff">9600&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">long&lt;/span> ms;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Deleting..&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ms &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">millis&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">I2C_eeprom_delete&lt;/span>(EEPROM_DEVICE,EEPROM_INIT,EEPROM_END);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">print&lt;/span>(&lt;span style="color:#a6e22e">millis&lt;/span>()&lt;span style="color:#f92672">-&lt;/span>ms);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;ms&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;---- Dump ---&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">DumpHex&lt;/span>(EEPROM_DEVICE,EEPROM_INIT,EEPROM_INIT&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0x0f&lt;/span>); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">DumpHex&lt;/span>(EEPROM_DEVICE,EEPROM_END&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0x0f&lt;/span>,EEPROM_END); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;---- Write at begin ---&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">DumpHex&lt;/span>(EEPROM_DEVICE,EEPROM_INIT,EEPROM_INIT&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0x0f&lt;/span>); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Writing...&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">I2C_eeprom_write_byte&lt;/span>(EEPROM_DEVICE,EEPROM_INIT,&lt;span style="color:#ae81ff">0xCC&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">I2C_eeprom_write_byte&lt;/span>(EEPROM_DEVICE,EEPROM_INIT&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0x0f&lt;/span>,&lt;span style="color:#ae81ff">0xCC&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">DumpHex&lt;/span>(EEPROM_DEVICE,EEPROM_INIT,EEPROM_INIT&lt;span style="color:#f92672">+&lt;/span>&lt;span style="color:#ae81ff">0x0f&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;---- Writte at end ---&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">DumpHex&lt;/span>(EEPROM_DEVICE,EEPROM_END&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0x0F&lt;/span>,EEPROM_END); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;Writing...&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">I2C_eeprom_write_byte&lt;/span>(EEPROM_DEVICE,EEPROM_END,&lt;span style="color:#ae81ff">0xCC&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">I2C_eeprom_write_byte&lt;/span>(EEPROM_DEVICE,EEPROM_END&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0x0f&lt;/span>,&lt;span style="color:#ae81ff">0xCC&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">DumpHex&lt;/span>(EEPROM_DEVICE,EEPROM_END&lt;span style="color:#f92672">-&lt;/span>&lt;span style="color:#ae81ff">0x0f&lt;/span>,EEPROM_END); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Serial.&lt;span style="color:#a6e22e">println&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;---- end ---&amp;#34;&lt;/span>); 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">//DumpHex(EEPROM_DEVICE,EEPROM_INIT,EEPROM_INIT+0x0f);
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span> &lt;span style="color:#75715e">//DumpHex(EEPROM_DEVICE,EEPROM_END-0x0f,EEPROM_END); 
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">loop&lt;/span>()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>He añadido l2C_eeprom_delete para borrar la eeprom, . Tambien he añadido un delay(5) tras cada operación de escritura debido a que si no, no me escribia bien.&lt;/p></description></item><item><title>Arduino LC24XX EPROM (paginated)</title><link>http://blog.romheat.net/posts/2011/11_03_03_arduino_lc24xx_paginated/</link><pubDate>Thu, 03 Mar 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_03_03_arduino_lc24xx_paginated/</guid><description>&lt;p>Habia algunas cosas que no me cuadraban &amp;hellip;&lt;/p>
&lt;p>Lógico.&lt;/p>
&lt;p>Con la biblioteca actual Wire y las funciones I2C_eeprom de (&lt;a href="http://www.arduino.cc/playground/Code/I2CEEPROM" target="_blank">http://www.arduino.cc/playground/Code/I2CEEPROM&lt;/a>) .. me he dado cuenta de que las direciones van en un entero (int) que en arduino, son 2 Bytes (16 bits) y con eso no podemos escribir más alla de los 64k, de modo que he cambiaod el código para usar un sistema de páginación.&lt;/p>
&lt;p>Por ejemplo con 4 24lc256 tendriamos 4 páginas de 32k lo resumo en estas dos funciones&lt;/p></description></item><item><title>Fonera ser2net</title><link>http://blog.romheat.net/posts/2011/11_02_03_fonera_ser2net/</link><pubDate>Thu, 03 Feb 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_02_03_fonera_ser2net/</guid><description>&lt;p>He tenido muchos problemas y no he conseguido hacer funcionar el ipkg correctamente en la fonera, creo que es un problema de rutas .. al final he hecho una serie de inventos.&lt;/p>
&lt;p>cada vez que me ejecuto el &amp;ldquo;ipkg update&amp;rdquo; me dan estos errores&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>ERROR: File not found: //usr/local/lib/ipkg/lists/whiterussian
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> You probably want to run &lt;span style="color:#e6db74">`&lt;/span>ipkg update&lt;span style="color:#e6db74">&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">ERROR: File not found: //usr/local/lib/ipkg/lists/non-free
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> You probably want to run `ipkg update&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ERROR: File not found: //usr/local/lib/ipkg/lists/backports
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> You probably want to run &lt;span style="color:#e6db74">`&lt;/span>ipkg update&lt;span style="color:#960050;background-color:#1e0010">&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>en mi ddwrt no hay /usr/local/lib y no puedo crearlo&lt;/p></description></item><item><title>Fonera Kamikaze</title><link>http://blog.romheat.net/posts/2011/11_02_02_fonera_kamikaze/</link><pubDate>Wed, 02 Feb 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_02_02_fonera_kamikaze/</guid><description>&lt;p>Notas de la instalación&lt;/p>
&lt;p>descargar de &lt;a href="http://downloads.openwrt.org/kamikaze/8.09/atheros/" target="_blank">http://downloads.openwrt.org/kamikaze/8.09/atheros/&lt;/a>&lt;/p>
&lt;ul>
&lt;li>openwrt-atheros-vmlinux.lzma&lt;/li>
&lt;li>openwrt-atheros-root.squashfs&lt;/li>
&lt;/ul>
&lt;p>entrar por serie al redBoot&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>RedBoot&lt;span style="color:#f92672">(&lt;/span>tm&lt;span style="color:#f92672">)&lt;/span> bootstrap and debug environment &lt;span style="color:#f92672">[&lt;/span>ROMRAM&lt;span style="color:#f92672">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Non-certified release, version V1.00 - built 10:37:27, Dec &lt;span style="color:#ae81ff">12&lt;/span> &lt;span style="color:#ae81ff">2006&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Copyright &lt;span style="color:#f92672">(&lt;/span>C&lt;span style="color:#f92672">)&lt;/span> 2000, 2001, 2002, 2003, &lt;span style="color:#ae81ff">2004&lt;/span> Red Hat, Inc.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Board: FON1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RAM: 0x80000000-0x81000000, &lt;span style="color:#f92672">[&lt;/span>0x80040aa0-0x80fe1000&lt;span style="color:#f92672">]&lt;/span> available
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>FLASH: 0xa8000000 - 0xa87f0000, &lt;span style="color:#ae81ff">128&lt;/span> blocks of 0x00010000 bytes each.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">==&lt;/span> Executing boot script in 5.000 seconds - enter ^C to abort
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>^C
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RedBoot&amp;gt; ip_address -l 192.168.1.254/24 -h 192.168.1.5
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>IP: 192.168.1.254/255.255.255.0, Gateway: 0.0.0.0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Default server: 192.168.1.5
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RedBoot&amp;gt; fis init
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>About to initialize &lt;span style="color:#f92672">[&lt;/span>format&lt;span style="color:#f92672">]&lt;/span> FLASH image system - &lt;span style="color:#66d9ef">continue&lt;/span> &lt;span style="color:#f92672">(&lt;/span>y/n&lt;span style="color:#f92672">)&lt;/span>? y
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>*** Initialize FLASH Image System
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Erase from 0xa87e0000-0xa87f0000: .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RedBoot&amp;gt; load -r -b %&lt;span style="color:#f92672">{&lt;/span>FREEMEMLO&lt;span style="color:#f92672">}&lt;/span> openwrt-atheros-vmlinux.lzma
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Using default protocol &lt;span style="color:#f92672">(&lt;/span>TFTP&lt;span style="color:#f92672">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Raw file loaded 0x80040c00-0x80100bff, assumed entry at 0x80040c00
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RedBoot&amp;gt; fis create -e 0x80041000 -r 0x80041000 vmlinux
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Erase from 0xa8030000-0xa80f0000: ............
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Program from 0x80040c00-0x80100c00 at 0xa8030000: ............
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Erase from 0xa87e0000-0xa87f0000: .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RedBoot&amp;gt; load -r -b %&lt;span style="color:#f92672">{&lt;/span>FREEMEMLO&lt;span style="color:#f92672">}&lt;/span> openwrt-atheros-root.squashfs
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Using default protocol &lt;span style="color:#f92672">(&lt;/span>TFTP&lt;span style="color:#f92672">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Raw file loaded 0x80040c00-0x801e0bff, assumed entry at 0x80040c00
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RedBoot&amp;gt; fis free
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 0xA80F0000 .. 0xA87E0000
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RedBoot&amp;gt; fis create -l 0x6f0000 rootfs
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Erase from 0xa80f0000-0xa87e0000: ..........................................................................
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Program from 0x80040c00-0x801e0c00 at 0xa80f0000: ..........................
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Erase from 0xa87e0000-0xa87f0000: .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RedBoot&amp;gt; fconfig
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Run script at boot: true
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Boot script:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>.. fis load -l linux
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>.. exec
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Enter script, terminate with empty line
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&amp;gt;&amp;gt; fis load -l vmlinux
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&amp;gt;&amp;gt; exec
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&amp;gt;&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Boot script timeout &lt;span style="color:#f92672">(&lt;/span>1000ms resolution&lt;span style="color:#f92672">)&lt;/span>: &lt;span style="color:#ae81ff">5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Use BOOTP &lt;span style="color:#66d9ef">for&lt;/span> network configuration: false
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Gateway IP address:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Local IP address: 192.168.1.1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Local IP address mask: 255.255.255.0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Default server IP address: 192.168.1.254
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Console baud rate: &lt;span style="color:#ae81ff">9600&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>GDB connection port: &lt;span style="color:#ae81ff">9000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Force console &lt;span style="color:#66d9ef">for&lt;/span> special debug messages: false
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Network debug at boot time: false
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Update RedBoot non-volatile configuration - &lt;span style="color:#66d9ef">continue&lt;/span> &lt;span style="color:#f92672">(&lt;/span>y/n&lt;span style="color:#f92672">)&lt;/span>? y
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Erase from 0xa87e0000-0xa87f0000: .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RedBoot&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Nota*&lt;/p></description></item><item><title>Fonera Serial</title><link>http://blog.romheat.net/posts/2011/11_02_02_fonera_client/</link><pubDate>Wed, 02 Feb 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_02_02_fonera_client/</guid><description>&lt;p>Borrar la nvram&lt;/p>
&lt;p>&lt;code>mtd -r erase nvram&lt;/code>&lt;/p>
&lt;p>Configuración
Wan - disabled
STP - enabled&lt;/p>
&lt;p>Configurar el wireles con el mismo ssid que el router de casa
En security asignar los permisos
En el setup básico darle una IP de las de casa&lt;/p>
&lt;h2 id="recovery">Recovery&lt;/h2>
&lt;p>Como la fonera esta estropeada he tenido que hacer un recovery ..&lt;/p>
&lt;p>Para empezar la he conectado al arduino, así puedo usar el terminal (terraterm) para acceder al RedBoot&lt;/p></description></item><item><title>Fonera Serial</title><link>http://blog.romheat.net/posts/2011/11_02_01_fonera_serial/</link><pubDate>Tue, 01 Feb 2011 00:00:00 +0100</pubDate><guid>http://blog.romheat.net/posts/2011/11_02_01_fonera_serial/</guid><description>&lt;p>Material - Un router la fonera.&lt;/p>
&lt;p>&lt;img src="http://blog.romheat.net/images/Electronics/fonera_serial1.jpg" alt="">&lt;/p>
&lt;p>&lt;img src="http://blog.romheat.net/images/Electronics/fonera_serial2.jpg" alt="">&lt;/p>
&lt;p>&lt;img src="http://blog.romheat.net/images/Electronics/fonera_serial3.jpg" alt="">&lt;/p>
&lt;p>Código
Una vez establecidas las conexiones usando el terminal pordemos acceder al puerto serie de la fonera via el arduino.&lt;/p>
&lt;p>He instalado el openWrt Instalando openWrt Kamikaze (me ha gustado más que el ddwrt) ademas me deja casi 4Mb libres en la memoria de la fonera y he instalado algunos paquetes que me han interesado.&lt;/p>
&lt;p>Aunque he estado enredando con el el ser2net (ser2net) al final he optado por el netcat, me explico.&lt;/p></description></item></channel></rss>