Home Blog Page 1520

LibreS3 Open Source Amazon S3 Implementation Released

skylable

Skylable has released LibreS3, an open source implementation of the Amazon S3 service, suitable for installing on private servers in a datacenter. LibreS3 uses Skylable SX, a “reliable, fully distributed cluster solution”, on the back end for deduplication and replication. LibreS3 joins a growing list of alternative, open source storage solutions available to the enterprise today.

At first pass, Skylable may seem like another flash in the pan, but the team behind LibreS3 and Skylable SX are open source veterans. The team was the original developers behind ClamAV, one of the most popular anti-virus solutions in the world. The open source pedigree of the Skylable team grants confidence that the team will continue to deliver on a complex and challenging project. Recreating the Amazon S3 service, with most of the API available to third-party tools is no small task, but it is something that the modern datacenter desperately needs.

 

 
Read more at Ostatic

 

Linux Video of the Week: Linux Sucks (But Actually It’s Awesome)

Get ready for an entertaining – and possibly infuriating – examination of Linux desktop distributions from the perspective of community insider, writer and commentator, Bryan Lunduke.

In his annual “Linux Sucks” presentation at LinuxFest Northwest last Saturday in Bellingham, Washington, Lunduke unabashedly took aim at some controversial targets – Ubuntu, Fedora, Gnome, Wayland and X, to name a few – while simultaneously praising their accomplishments.

The talk highlights the Linux community’s capacity to gripe and moan about the very same software that it faithfully uses and loves. And Lunduke, well aware that he’s making himself a target of ridicule, conveys this dual nature well by going through the same set of slides twice: once to discuss how Linux sucks and once to hail how awesome it is. He does this well, with an air of showmanship (and a sprinkling of expletives.) But he ends on a sincere note.

“I think it’s absolutely amazing that we have a multi-million person community out there that’s rallied around one core set of an operating system, a piece of software, that we feel entirely invested in. For a lot of us it’s an identity,” said Lunduke, a social media marketing manager at SUSE (and a guest blogger for Linux.com). “And yet we yell about Linux on Reddit and every other website we get a chance to… and we still at the end of the day love Linux… and each other.”

https://www.youtube.com/watch?v=5pOxlazS3zs” frameborder=”0

Wayland 1.5 Release Candidate Is Out There

The first version 1.5 release candidates of Wayland and the Weston compositor are now available…

Read more at Phoronix

Distribution Release: OpenMandriva Lx 2014.0

Kate Lebedeff has announced the availability of OpenMandriva Lx 2014.0, the latest stable release of a distribution that features a highly customised and intuitive KDE desktop: “All of us in the OpenMandriva community are pleased to announce the release of OpenMandriva Lx 2014.0 ‘Phosphorus’.” What’s new in this….

Read more at DistroWatch

Calligra 2.8.1 is Out

Packages for the release of KDE’s document suite Calligra 2.8.1 are available for Kubuntu 12.04 LTS and 13.10. You can get it from the Kubuntu Backports PPA (alongside KDE SC 4.13). They are also in our development release.

Read more at Kubuntu

SMBs Will Spend More Than $3B on IT Security by 2017: Canalys

Heightened awareness about IT security and data protection — either from hackers or even government agencies — has also spurned more interest within SMBs.

Interested in Tizen? You need to be here.

It’s that time of year again! This year’s Tizen Developer Conference is June 2-4 in San Francisco.

The schedule was just announced, and this is shaping up to be another great conference. As always, the content will be technically oriented and geared towards Tizen app and platform developers. This is the single best place to go in order to learn about Tizen, because it’s the one place all of the experts converge.

If you went to last year’s conference, there was a lot of focus on developing Tizen apps. This year, we’ll again have a lot for app developers, but there’s a twist. What kind of app developer?

You see, there’s a lot more variety in Tizen devices this year. Yes, there will be sessions on Tizen app development on mobile phones, including native and HTML5 apps, porting from other platforms, and using middleware runtimes like Marmalade and Sencha to deploy Tizen apps. But we’ll also be talking about app development for wearable devices and TVs. I’ve said before, Tizen has always been about providing a codebase that works for multiple form factors and screen sizes, so this should come as no surprise.

There’s good news for you platform developers as well. Of course, we’ll have sessions for platform developers who want to work on Tizen source code. We’ll also talk about the IVI platform, and are really excited for a new track on using Tizen for the Internet of Things.

We really believe that Tizen is an awesome platform, and provides an excellent base for hardware hackers building the next big thing. This is a good place to learn about it.

I’m really looking forward to this conference. The content is always top notch, and the program committee works very hard to ensure the sessions are technical and relevant.

By the way, we have a discount code for linux.com readers. When you register as an attendee, use the code LFCOMTDC14 to get 50% off the registration price. This code is limited, so don’t wait to use it!

This has been a big year for Tizen, and it’s only getting started. Come and join us!

Microsoft-SUSE Alliance: Linux and Windows Interoperability for More Than 1,000 Customers

Most customers we speak with today operate heterogeneous IT environments and just want everything to work well together – whether they need to optimize existing investments or are interested in adopting new technologies along the way. One of Microsoft’s ongoing goals is to ensure that our technologies can meet these evolving customer needs whatever their platform preference.

We’ve been fortunate to work side-by-side with SUSE – a 20-year veteran in this space – to make this goal a reality, delivering unified solutions, integrated tools, and first-class support for mixed Windows and Linux environments.

…(read more)

Linux-Based K-9 Doppelganger Treads ELC

At the Embedded Linux Conference, Intel’s new Open Hardware Technical Evangelist showed off a Linux- and MinnowBoard based robot that mimics Doctor Who’s K-9. The high correlation between science fiction fans and techies reaches its zenith with the BBC show Doctor Who. But who knew that showing off one’s inner Time Lord could actually be […]

Read more at LinuxGizmos

Building an Arduino Pest Repeller on Linux (Part 2)

In part two of this series we load and test our critter-scaring Arduino sketch, and play scary motion-activated noises. First let’s go back to part 1 and dissect our simple EZ1 sensor-testing sketch.

fig-1 rinkydinkrig

An Arduino sketch contains two required functions: setup() and loop(). setup() contains code that you want to run once at the beginning of your sketch, such as pin modes and initializing hardware. In our ez1_measure.ino sketch we set our data transmission speed in setup(). We are setting a serial port speed even though our Arduino is connected with a USB cable because it is still a serial port, a proper UART (Universal Asynchronous Receiver/Transmitter), and it supports the standard serial port speeds: 300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, or 115200 baud. And that is why the Arduino IDE has a serial monitor where we can watch the output of our sketches.

loop() contains our program, and it is called loop() because it runs over and over until we pull the plug. So we have to figure out how to make a sound play only when someone intercepts the EZ1’s sonar beam, and then stop after playing once.

loop() begins by declaring two variables, a0value and inches. These are arbitrary keywords invented for this sketch, and are not reserved keywords. a0value holds the value captured from Analog Pin #0, and inches holds the final value of the calculated distance of an object. float is a reserved keyword, a built-in datatype for floating-point numbers, which are numbers with decimals.

analogRead() is a built-in function for reading values from the analog pins.

Serial.print() is a built-in function that prints text strings, which are enclosed in single or double quotes, to the serial port.

Serial.println() is a built-in function that prints the values of datatypes.

delay() is a built-in function that defines the length of a pause, in milliseconds, so in the ez1_measure.ino sketch we have three seconds delay between each sensor reading.

How is anyone supposed to know all this stuff? Simply consult the lovely Arduino language reference on Arduino.cc, the official Arduino Web site.

The Complete CritterScare Sketch

Mind your line breaks when you copy this sketch– // only comments out a single line, so if you accidentally insert some line breaks it won’t work.

And now, behold, the complete CritterScare Sketch.

// CritterScare.ino. Plays scary sound effects
// when a deer or other freeloader comes within 
// 24 inches of the sonar rangefinder
#include <FatReader.h>
#include <SdReader.h>
#include <avr/pgmspace.h>
#include "WaveUtil.h"
#include "WaveHC.h"
SdReader card; 
FatVolume vol;
FatReader root;
FatReader f;
WaveHC wave;
// declare functions; function bodies are 
// below loop() function
int freeRam(void);
void sdErrorCheck(void);
void playfile(char *name);
void playfile(char *name);
// setup() is a required Arduino function
void setup() {
  Serial.begin(9600);  
  Serial.print("nThe serial port is set to 9600 baud. nWelcome to the CritterScare Sketch!");
  Serial.print("nYou have ");
  Serial.println(freeRam());
  Serial.print("bytes of free RAM.");
  
// Set the output pins for the DAC control
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  
  if (!card.init()) {      
    Serial.print("nCard init. failed!");
    sdErrorCheck();
    while(1); 
  }
  
// enable optimize read - some cards may timeout. 
// Disable if you're having problems
  card.partialBlockRead(true);
 
// Now we will look for a FAT partition!
  uint8_t part;
  for (part = 0; part < 5; part++) {
    if (vol.init(card, part)) 
      break;    
  }
  if (part == 5) {    
    putstring_nl("Sorry, there is no valid FAT partition!");
    sdErrorCheck();  
    while(1);   
  }
  
// Print partition and filesystem information
  Serial.print("nI'm using partition ");
  Serial.print(part, DEC);
  Serial.print(" on the SD card, and the filesystem type is FAT");
  Serial.println(vol.fatType(),DEC);
  
// Try to open the root directory
  if (!root.openRoot(vol)) {
    Serial.print("nCan't open root dir!");
    while(1); 
  }
  
// Whew! We got past the tough parts.
  Serial.print("nEverything checks out, so let's get going!n");
}
// loop() is a required Arduino function
// convert voltage from sensor to inches
void loop() {
    float a0value = analogRead(0); 
    float inches = 0.496 * a0value; 
    Serial.print("nThe value captured from pin a0 is: "); 
    Serial.println(a0value);
    Serial.print("nThe distance in inches is "); 
    Serial.println(inches);
    delay(3000);
    
    int playback = 0;
    if (inches < 24 && playback == 0){
    playback = 1;
    playcomplete("COYOTEHOWL.WAV");
  }
  else if (inches < 24 && playback == !0){
  }
  else { playback = 0;
    wave.stop();
  }
}
// And now the other function bodies
// this handy function will return the number
// of bytes currently free in RAM, great for debugging!   
int freeRam(void)
{
  extern int  __bss_end; 
  extern int  *__brkval; 
  int free_memory; 
  if((int)__brkval == 0) {
    free_memory = ((int)&free_memory) - ((int)&__bss_end); 
  }
  else {
    free_memory = ((int)&free_memory) - ((int)__brkval); 
  }
  return free_memory; 
} 
void sdErrorCheck(void)
{
  if (!card.errorCode()) return;
  Serial.print("nrSD I/O error: ");
  Serial.println(card.errorCode(), HEX);
  Serial.print(", ");
  Serial.println(card.errorData(), HEX);
  while(1);
}
// Plays a WAV file from beginning to end with no pause.
void playcomplete(char *name) {
// call our helper to find and play this name
  playfile(name);
  while (wave.isplaying) {
    //do nothing else
     }
}
  
void playfile(char *name) {
// see if the wave object is currently doing something
  if (wave.isplaying) {
    wave.stop();
  }
// look in the root directory and open the file
  if (!f.open(root, name)) {
    Serial.print("nCouldn't open file "); 
    Serial.println(name); 
    return;
  }
// OK read the file and turn it into a wave object
  if (!wave.create(f)) {
    Serial.print("nNot a valid WAV"); return;
  }  
// ok time to play! start playback
  wave.play();
}

How it Works

Most of the code in this sketch is setup and error checks. The loop() function is where we tell it what to do, so let’s dissect it.

We are already familiar with the first seven lines, which are repurposed from ez1_measure.ino.

The next bit is where the magic happens to play the audio file only once and then stop, and not play it again until triggered by the sensor. Two conditions must be met to play the file: a critter must be within 24 inches or closer, and the file must not be already playing.

First initialize the value of playback (an arbitrary name and not a reserved keyword) to zero, which means don’t play:

int playback = 0;

Then set up the conditions to trigger playback: an object within 24 inches or closer, and the value of playback is at zero, which means the file is not already playing. When these two conditions are met then assign 1 as the value of playback, which means play, and specify which audio file to play:

if (inches < 24 && playback == 0){
    playback = 1;
    playcomplete("COYOTEHOWL.WAV");
  }

When your scary file is already playing, assign the value of zero to playback, so that it will stop when it reaches the end:

  else if (inches < 24 && playback == !0){
  }
  else { playback = 0;
    wave.stop();
  }

Then it is reset and waiting for the two conditions to trigger playback to happen again. There are other ways to do this, of course, so feel free to share your own ideas in the comments. Figure 2 shows what it looks like in action:

fig-2-sketch-output

Well alrighty then, that does it for now! Please enjoy this project, and if you have any questions consult the Resources section.

Resources

Ladyada.net Arduino Tutorials
Arduino language reference
An excellent introductory book for novices is Programming Arduino: Getting Started with Sketches by Simon Monk, and Arduino Cookbook, 2nd Edition by Michael Margolis is great if you already know a little about electronics and a smidgen of C programming.