Tuesday, March 10, 2020

Getting Marlin 2.0.x to work with Anet A8 and Ramps 1.4

Requirements: 

  • Prusa i3 or similar clone printer 
  • Ramps 1.4 board with Rep Rap Discount Full Graphic LCD Smart controller 
  • Arduino IDE v 1.8.12 from Windows Store 
  • Marlin v 2.0.4.4 
  • You can try other variations, but I am no guru on any of this so I cannot advise further. This is just what I got to work, through much trial and error.  

Problem 1: Display is garbled.
Solution: Do the suggested edit by "Coolision" found on https://github.com/MarlinFirmware/Marlin/issues/15391

just spent some hours on it as wel, found a fix for marlin 2.0, in the file src/lcd/dogm/ultralcd_DOGM.h on line 54 (you'l see somewhere above that line a comment saying RepRap Discount Full Graphics Smart Controller) change the line from #define U8G_CLASS U8GLIB_ST7920_128X64_RRD to #define U8G_CLASS U8GLIB_ST7920_128X64_1X that worked for me

Problem 2: Display reads "EEPROM version mismatch"
Solution: Do the suggested edit by "Roxy-3D" found on https://github.com/MarlinFirmware/Marlin/issues/12860

Doing a M502 followed by a M500 should resolve any EEPROM version mismatch...

Your mesh data for bed leveling will be preserved. But any other changes to your configuration values will be reset.

Note: This also fixed a CRC error being thrown during compile.

Problem 3: The endstops and motor directions are all screwed up and inverted from the identical mechanical setup that worked on Marlin 1.9
Solution: Currently working on it and will share my configuration.h file when I get it sorted out.

That is all for today...

Wednesday, August 24, 2016

How to delete music from your Android device.

Google Play Music and its associated Windows Chrome webapp suck major balls on the user interface/navigation front! I just want to free up some space on my HTC One M8 phone to do a full backup to the 32G SD card, but can't do that with 26G of music on the card. Its already stored in Itunes on my PC so no permanent loss. After much searching and trying everybody else's methods, no joy. So here you go, quick and simple.

1. Go to phone Settings/Storage
2. Scroll down to the SD Card section. It will show you different categories of files.
3. Below these, you will find Make More Space
4. Select Music
5. Individually check songs to delete, or up in the top right corner menu, you can Select All.
6. Delete

Back again!

It's been a while since I messed with my robots. I'm always tinkering though, done some more Arduino things and Raspberry Pi. Currently messing with my RC car. I'll continue to add things to this blog, not neccessarily robot related, but those updates are coming too.

Thursday, June 21, 2012

A start to my Arduino-based robot controller

Utilizes a Solarbotics Freeduino, Parallax backlit 2x16 serial LCD w/ Speaker, a pair of Sparkfun XBee breakout boards w/ 1  mW XBee pair, and a Pololu mini Maestro servo controller. Basic functionality so far. Read wirelessly from Xbee connected serial terminal, print to LCD and back to terminal, and sending commands to the servos.


//RoboCon v.4a
// www.parallax.com (part #27977-RT)
// June/16/2012 Arduino ver: 023
// M. Ramirez "mannyr7" on Trossen Robotics forum
int i=0;


#include <NewSoftSerial.h>
NewSoftSerial maestroSerial(7, 5); 
// yellow wire Arduino tx to Mestro rx
// blue wire Arduino rx to Maestro tx
                                   
NewSoftSerial LCD(1, 2);
// second variable defines the tx pin to the LCD


NewSoftSerial xBee(3, 4); 
// yellow wire Arduino tx to Xbee rx
// green wire Arduino rx to Xbee tx                              


void setup()  
{
  LCD.begin(9600);  
// LCD dip switches set to 1=OFF, 2=ON for 9600 baud


  delay(100); // suggested delay from Parallax
  
  LCD.write(0x0C); // Clear display, move cursor to top-left
  LCD.write(0x19); // Display on, cursor on, char blink
  LCD.write(0x11); // LCD backlight on
  LCD.print("Arduino active");
  delay(1000);
  LCD.write(0x0C); // Clear display, move cursor to top-left
  LCD.print("LCD ready"); 
  delay(1000);
  
  xBee.begin(38400);
  delay(1000); //wait for xbees to pair up
  LCD.write(0x0C); // Clear display, move cursor to top-left
  LCD.print("Xbees paired");  


  maestroSerial.begin(9600);
  delay(1000); 
  settarget(0, 0); // servo port #, position in degrees
  settarget(1, 0);
  settarget(2, 0);
  delay(1000);
  settarget(0, 180);
  settarget(1, 180);
  settarget(2, 180);
  delay(1000);
  settarget(0, 90);
  settarget(1, 90);
  settarget(2, 90);  
  
  LCD.write(0x0C); // Clear display, move cursor to top-left
  LCD.print("Servos ready"); 
  
  // Play "Charge!!!"
  LCD.write(0xD2); // set note length to 1/16 note
  LCD.write(0xE6); // G note
  LCD.write(0xDF); // C note
  LCD.write(0xD3); // set note length to 1/8 note
  LCD.write(0xE3); // E note
  LCD.write(0xD4); // set note length to 1/4 note
  LCD.write(0xE6); // G note
  LCD.write(0xD3); // set note length to 1/8 note
  LCD.write(0xE3); // E note
  LCD.write(0xD5); // set note length to whole note
  LCD.write(0xE6); // G note
  
  delay(1000);
  LCD.write(0x0C); // Clear display, move cursor to top-left
  LCD.print("RoboCon v.4a"); 
}
void loop() // listen for keyboard and print to LCD and serial window
{
  char string='/0';
  xBee.listen();
  if (xBee.available())  
  {
    char c = xBee.read();
    LCD.write(0x0C); // Clear display, move cursor to top-left   
    LCD.println(c);
    xBee.println(c);
    i=0;
    delay(1000);
  }
  else
    {
    LCD.write(0x0C); // Clear display, move cursor to top-left      
    LCD.print(i+=1);
    delay(1000);
    }
}


//Send a Set Target command to the Maestro.
//Target is in units of quarter microseconds,
// so the normal range is 4000 to 8000.
void settarget(unsigned char servo, unsigned int target)
{
  target = map(target, 0, 180, 2400, 9500);
  maestroSerial.print(0xAA,BYTE); //start byte
  maestroSerial.print(0x0C,BYTE) ; //device id
  maestroSerial.print(0x04,BYTE); //command number
  maestroSerial.print(servo,BYTE); //servo number
  maestroSerial.print(target & 0x7F, BYTE);
//  LCD.print(target & 0x7F, BYTE);  
  maestroSerial.print((target >> 7) & 0x7F,BYTE);
//  LCD.print((target >> 7) & 0x7F,BYTE);  
}

Tuesday, September 6, 2011

More Chumby Hacks (Insignia Infocast)

I used Ultra Voice Changer, an Android app, to record some audio and alter it using the built-in robot filter preset. The alien presets are pretty cool too. Alternatively, you could use a text to speech website from AT&T Labs to generate some nice vocals for your Chumby. I plan to use these .wav files to indicate startup, shutdown, and a few other status changes. I saved mine in mono at 11 kHz to save on space. I then transferred my audio files by usb stick to the Chumby and placed them in a directory I made at /mnt/storage/sounds/ From there it's simply a matter of calling
aplay /mnt/storage/sounds/robotmode.wav
to call up our .wav files. If you prefer .mp3 format, use btplay instead.

Saturday, September 3, 2011

Chumby Hacks (Insignia Infocast)

First off, I could not ssh into my device from Putty or any other remote terminal as described in the Chumby Tricks wiki. So, I attached a USB keyboard to the Infocast, which automatically puts it in terminal mode. Then, I typed:
mount -o remount,rw /
putting the root filesystem into read,write mode.
Next, type:
passwd root
to create a root password. Enter it twice as prompted, then you should be able to ssh in remotely.
Unplug your keyboard and ssh into it from a remote computer!

Successfully connected? You should see the chumby logo in ASCII art.

Next, we'll have the sshd server always start upon bootup.
From your remote terminal app of choice, type:
touch /psp/start_sshd
That's all there is to it!


Following the directions at adafruit, I next installed the falconwing gcc toolchain. So far, so good!

Using directions from this page, install python! Here's how to install it: 

cd /mnt/storage 
wget http://files.chumby.com/languages/python/python2.6-­chumby.tgz 
tar -­xzf python2.6-­chumby.tgz 
python --­­help 

Great! Now I have all the programming environments necessary for more robotic tinkering in the near future.

Adventures in ChumbyLand!

Hello again! Been a long time since my last blog post, but I have been busy!
     This summer, I finally got around to hacking my Insignia Infocast 3.5", now discontinued :-( which I picked up after Christmas for $49. I made a lot of tweeks and hacks to it, to make it the brains of my next robot. Unfortunately, I went a little too far editing the boot sequence and bricked it! Being a dummy, I didn't back up the sdcard rom before messing with the device. But after much searching, I found the OEM rom image and a control panel update to my relief. BTW, a standard Chumby Industries falconwing nor a Adafruit Chumby Hacker Board rom image will work on the Infocast 3.5".
     So now I have it back up again, to factory original! This time I backed up the rom image, update.tgz, and will document all the hacks I do, in case I screw things up again!