Friday Aug 23, 2013

Qualcomm's Uplinq Mobile CodeFest & Hackathon: 03-05Sep2013 San Diego, Calif

Qualcomm is hosting a a Mobile CodeFest and Hackathon in sunny Sandy Eggo, California on Sept. 3-5, 2013. If you're into mobile app development or like winning prizes, make sure to register to attend.

See:

Uplinq Mobile CodeFest & Hackathon

Here's a quote:

 If you're a mobile app developer, the 
 Uplinq Mobile CodeFest & Hackathon are 
 for you. Seeking education? Spend the 
 day attending CodeFest sessions to 
 get tips & tricks from the experts...
Fun! The best overall app wins $10,000 plus 5 tickets to the San Diego Padres vs. San Francisco Giants game on Wed., Sept. 4. That should actually be the "World Champion" San Francisco Giants. Go Giants! (And, sign up today for the Mobile CodeFest & Hackathon)

Friday Aug 02, 2013

RPi with an Oscilloscope and Java Embedded: Ready for Benchmarking (Part 8)

Well, as I mentioned to Robert Savage recently, I know how to get to the same speed in Java SE Embedded as the Pi4J Java to JNI library from Savage Home Automation and more importantly to also achieve the same 5MHz max frequency on a GPIO pin as using C native. But knowing how is not exactly the same as implementing, is it? :-) So, I'll show how instead, since showing is the same as implementing, right? ;-) Well, it should be the same. B-)

The approach in theory could use NIO memory mapped buffer that I was originally thinking should be as fast as C native. But in practice anyone that has tried this has gotten a bug where it says "No device found" error when trying to map the /dev/mem of the Raspberry Pi. That's what @Geomancer86 also noticed also, as he mentioned on twitter.

So, what's the deal? It seems Java SE Embedded NIO does one type of file open and mmap down in the native layer underneath java.nio.ByteBuffer that does not allow for opening native memory devices (only real files on the Linux system). But, we need to access /dev/mem from Java on the Raspberry Pi to access the GPIO pins in memory to flip the bits as fast as possible to reach the maximum possible frequency in doing so.

There something we can learn by looking at Gordon Henderson's WiringPi C native code. That is there's a different way of doing the native file open and mmap that's needed, and we know he's doing it the right way since WiringPi can get that 5MHz on the GPIO pins that we want.

See: https://github.com/WiringPi/WiringPi/blob/master/wiringPi/wiringPi.c
Scroll down to line 1319

// Open the master /dev/memory device

  if ((fd = open ("/dev/mem", O_RDWR | O_SYNC) ) < 0)
  {
    if (wiringPiDebug)
    {
      int serr = errno ;
fprintf (stderr, "wiringPiSetup: Unable to open /dev/mem: %s\n", 
  strerror (errno)) ;
      errno = serr ;
    }
    return -1 ;
  }

// GPIO:

  gpio = (uint32_t *)mmap(0, BLOCK_SIZE, PROT_READ|PROT_WRITE, 
    MAP_SHARED, fd, GPIO_BASE) ;
  if ((int32_t)gpio == -1)
  {
    if (wiringPiDebug)
    {
      int serr = errno ;
fprintf (stderr, "wiringPiSetup: mmap failed: %s\n", 
  strerror (errno)) ;
      errno = serr ;
    }
    return -1 ;
  }

Instead of what NIO does currently, we need to instead do the same as above and then hand back a Java ByteBuffer that is pointing to that GPIO Base mapped in memory. Then we can use java.nio.ByteBuffer to twiddle bits representing the GPIO pins and turn them on/off as fast as possible, which in theory gives us that max 5MHz.

If anyone wants to try this, try extracting just that WiringPi native C code from Gordon Henderson's library (above) and make your own JNI call to it from Java SE Embedded to mimic what NIO does. Then make another JNI call to do a write to the memory just like Gordon does to turn the pin on/off as fast as possible. That in theory should give the max 5MHz that C native can do and have it be accessible from the Java SE Embedded side.

So, that's me showing how it could be done, it's up to someone out there to see if that theory holds up. Any takers? Showing is just like implementing, right? :-)

Wednesday Jul 03, 2013

Skynet Big Data Demo Using Hexbug Spider Robot, Raspberry Pi, and Java SE Embedded (Part 5)

Now, here is the connection diagram to connect the wires you have soldered onto your Hexbot Spider remote control, first to a breadboard with four 2N4401 transistors, four 10K ohm resistors, and then to the Raspberry Pi GPIO pins. You can see we are using a breadboard as a staging area for each of the connections that eventually run back to the Raspberry Pi. And, the transistors will act as switches for turning on and off the remote controller buttons from a Java SE Embedded app.

If you need to refresh your memory, below is the Raspberry Pi GPIO pinout diagram.

See:

RPi GPIO Pinout

So, with these two diagrams you should be able to connect your Hexbot Spider remote to the Raspberry Pi. Next up, we will look at how to program the Java SE Embedded app that is needed to run the remote control to make the Hexbot Spider robot move. Fun! :-)

Friday Jun 28, 2013

Skynet Big Data Demo Using Hexbug Spider Robot, Raspberry Pi, and Java SE Embedded (Part 4)

Here's the first sign of life of a Hexbug Spider Robot converted to become a Skynet Big Data model T-1. Yes, this is T-1 the precursor to the Cyberdyne Systems T-101 (and you know where that will lead to...) :-) It is demonstrating a heartbeat using a simple Java SE Embedded program to drive it.

See:

Skynet Model T-1 Heartbeat

It's alive!!! Well, almost alive. At least there's a pulse. We'll program more to its actions next, and then finally connect it to Skynet Big Data to do more advanced stuff, like hunt for Sarah Connor.

Java SE Embedded programming makes it simple to create the first model in the long line of T-XXX robots to take on the world. Raspberry Pi makes connecting it all together on one simple device, easy. Next post, I'll show how the wires are connected to drive the T-1 robot.

Monday Jun 24, 2013

Skynet Big Data Demo Using Hexbug Spider Robot, Raspberry Pi, and Java SE Embedded (Part 3)

In Part 2, I described what connections you need to make for this demo using a Hexbug Spider Robot, a Raspberry Pi, and Java SE Embedded for programming. Here are some photos of me doing the soldering. Software engineers should not be afraid of a little soldering work. It's all good.

See:

Skynet Big Data Demo (Part 2)

One thing to watch out for when you open the remote is that there may be some glue covering the contact points. Make sure to use an X-Acto knife or small screwdriver to scrape away any glue or non-conductive material covering each place where you need to solder.

And after you are done with your soldering and you gave the solder enough time to cool, make sure all your connections are marked so that you know which wire goes where. Give each wire a very light tug to make sure it is soldered correctly and is making good contact.

There are lots of videos on the Web to help you if this is your first time soldering. Check out Laday Ada's (from adafruit.com) links on how to solder if you need some additional help: http://www.ladyada.net/learn/soldering/thm.html

If everything looks good, zip everything back up and meet back here for how to connect these wires to your Raspberry Pi. That will be it for the hardware part of this project. See, that wasn't so bad. ;-)

Tuesday Jun 18, 2013

Java "License to Code" YouTube Video

Here's a promotional video for the Java EE 7 launch. I'm pretty sure that's supposed to be a Tom Cruise-like character who frees all the Java Developers from the warehouse. And why are all the Java Developers in a warehouse to begin with? Did they do something wrong? Did they forget to buy bulk products at a reasonable price? Maybe Sharat knows? Looks like that's him in the middle of the group.

See:

Java: License to Code

Helicopters, the San Francisco Bay Bridge, BART trains... fresh fruit stands... It's all very frightening. But, in the end, Java Developers rise up and take back Java. All is saved! :-) Thank goodness! Phew! :-P

Monday Jun 17, 2013

Skynet Big Data Demo Using Hexbug Spider Robot, Raspberry Pi, and Java SE Embedded (Part 2)

"Get ready for a major remodel fellas. We're back in hardware mode." -- Tony Stark.

Before we can use Java SE Embedded with our Skynet Big Data enabled Hexbug Spider robot, we need a little hardware hacking. Don't be afraid, just a little soldering.

Find the Hexbug Spider remote (little blue box pictured in the top of the photo). Carefully, use a small flat screwdriver and pry apart the four plastic tabs (two on each side). The top of the transmitter comes right off. Then flip it over and find the test points in the photo where we will solder wires onto.

See:

There are 7 contact points:

 1: GND
 2: fwd: Forward
 3: +3.3v (power)
 4: bkwd: Backward
 5: left: Left
 6: channel: A/B select
 7: right: Right
Solder 7 5-inch pieces of wire (each marked differently or having a different color to identify them) on to each of the 7 contact points and run the 7 wires out of the channel hole of the case and snap it back together. Next, we'll connect those 7 wires to the Raspberry Pi so that our Java SE Embedded app can control the remote. Exciting already, eh? ;-)

Tuesday Jun 11, 2013

Skynet Big Data Demo Using Hexbug Spider Robot, Raspberry Pi, and Java SE Embedded (Part 1)

I'm still plugging away at RPi Oscilloscope benchmarking GPIO using Java Embedded in my spare time (stuck on getting NIO to work), but for now I need a break, so I'll go back to another cool use of GPIO using Java SE Embedded and a Raspberry Pi. Here are all the parts I just got for about $30.

I bought everything from RadioShack (except for the RPi), so you can do the same at home.

See:

Here is the list of parts:

 1: *Hexbug Spider Robot (60-013) 
    *ON SALE $5 off until 6/20/2013! 
 2: 100 Ohm resistors (271-1311)
 3: 10k Ohm resistors (271-1335)
 4: Jumper Wire Kit (276-173)
 5: NPN-Type Transistors (276-1617)
The goal is to use Skynet Big Data to make the Hexbug Spider robot move using a Java SE Embedded app running on the Raspberry Pi. So, this should be good... Go grab your RPi and buy these parts at your local 'Shack, then come back here for more instructions... :-D

Tuesday Jun 04, 2013

When your Machines Need to Talk with Other Machines, Use Java Embedded Tech

What happens when your devices need to talk to their data center, like when your squadron of HK-Aerials need to contact Skynet to find where the rebel humans are huddled? You use Oracle's Java Embedded technology, of course!

See:

Oracle's Device to Data Center

Here's a quote:

 In this connected world, the 
 proliferation of intelligent 
 devices has created a market 
 for entirely new solutions 
 based on Machine-to-Machine 
 (M2M) technology. Organizations 
 need more innovative ways to 
 harness ever-increasing amounts 
 of data, and use it to drive 
 smarter decisions, enable new 
 services and business models, 
 and reduce costs.
In a world where your devices need the latest coordinates of the human infestation, turn to Java Embedded tech. It's the key to smooth M2M (Machine-to-Machine) communication.

Tuesday May 28, 2013

Fast Data: Rise of the Java Embedded Technology-Enabled Machines

Because we need fast access to big data, the Rise of the Machines is finally happening. And, they're Java Embedded Technology-Enabled machines.

See:

Fast Data: Rise of the Machines

Here's a quote:

 There are many technologies that 
 support fast data. Baer lists his 
 fast data ingredients: in-memory 
 data grids and in-memory database 
 technologies, event processing and 
 high-speed transaction engines, 
 data integration, replication and 
 transformation technologies, and 
 real-time and predictive-based
 analytic tools...

 From embedded Java on devices and 
 Oracle Fusion Middleware to Oracle 
 Applications and Oracle engineered 
 systems... Oracle provides a practical 
 Device to Data Center platform...
Cool... It'll be interesting to watch the evolution of machines speed up now that Java Embedded technology is spreading. :-)

Thursday May 16, 2013

Oracle PartnerCast: Oracle Java Embedded Updates

Here's a recent video of Geoff Morton, our Group Vice President of Worldwide Java Sales, interviewing Henrik Stahl, our Senior Director of Product Management at Oracle, asking about Java Embedded Updates.

See:

Oracle Java Embedded Updates

I like the intro music. Very catchy. And, learn all about Java Embedded on devices!

Wednesday May 08, 2013

Intel Atom vs ARM, CPU battle for Java Embedded devices

Whether its an embedded device with an ARM CPU chip or one of the new fancy-schmancy Intel Atom super-power-efficient, crazy-high-performance Silvermont CPU chips coming out for embedded and mobile devices, programming using Java Embedded technology will be the way to go on either.

See:

Crazy-Delicious Silvermont Atom

Here's a quote:

 The new microarchitecture, code-named 
 Silvermont, will be a key building 
 block in upcoming Intel chips for 
 mobile gadgets, microservers and car 
 entertainment systems, Chief Product 
 Officer Dadi Perlmutter told 
 reporters at an event on Monday.

 "We have not only reduced the power 
 in a significant manner but it comes 
 with significant performance," 
 Perlmutter said.
That's pretty cool. Our high-performance Java SE Embedded stack is available on both Linux/x86 and Linux/ARM to run on either of these competing CPU microarchitectures. Let the games begin! Anyone got any good microserver benchmarks in the meantime..?

Friday Apr 26, 2013

BeagleBone Black: Great Raspberry Pi competitor and runs Java SE Embedded

Step right up! For only $45, you can get an awesome BeagleBone Black Linux/ARM, Sitara AM335x 1GHz ARM Cortex-A8 processor, 512MB DDR3 RAM, and 2GB of eMMC memory. Wow! Now, that's giving the RPi a run for it's money! And... it can run Java SE Embedded. That's the coolest part...

See:

BeagleBone Black $45

Here's a quote:

 Out of the box, the BeagleBone Black 
 includes a single DC power barrel
 connector, two USB 2.0 ports (one 
 micro USB), a micro SD card slot, a 
 micro HDMI port for video output, and 
 a 10/100 Ethernet jack (internally 
 USB, just like the Raspberry Pi). In 
 addition to the somewhat-standard 
 PC/mobile IO options, the BeagleBone 
 Black has two 46-pin connectors on 
 either side of the PCB that can 
 accept cape expansion cards...
Only 45 bucks. Nice. Think of all the Java Embedded apps you can run on that... :-)

Thursday Apr 11, 2013

Last chance! A few good embedded submissions needed for JavaOne

Roger Brinkley is making a plea for a few good embedded abstracts for the JavaOne 2013 call for papers which is still open until Fri. 12Apr2013.

See:

A Few Good Talks

Here's a quote:

 The JavaOne 2013 Call for Papers closes 
 April 12, but [Roger Brinkley is] still 
 looking for a few good Embedded Java talks
Go here JavaOne 2013 Call for Papers and submit your idea today! You CAN handle the truth!

Thursday Apr 04, 2013

RPi with an Oscilloscope and Java Embedded: Ready for Benchmarking (Part 7)

Meh. I'm only getting 22KHz (see photo) with this last approach using java.io.FileWriter on the GPIO file handle. That's much slower than the Pi4J Java to JNI library from Savage Home Automation. And, no where close to the 5MHz using C native.

It might be better to continue to debug the NIO memory mapped buffer that I was originally thinking should be as fast as C native. I was getting "No device found" error when trying to map the /dev/mem of the Raspberry Pi. So, it might have something to do with the /dev/mem not actually looking like a file to the java.nio APIs.

I'll start adding some debug lines to my NIO code next to see if I can narrow down the issue. Meanwhile, I'll also try taking out the flush() calls and see if I can eke out a bit more speed from the java.io.FileWriter approach...

/*
 * Example Code
 */
      // Set up a GPIO port as a command channel
      FileWriter commandChannel = new 
        FileWriter("/sys/class/gpio/gpio" +
        GpioChannels[0] + "/value");
            
      // Loop forever with fastest on/off to GPIO pin
      while (true) {
         commandChannel.write(GPIO_ON);
         //commandChannel.flush();               

         commandChannel.write(GPIO_OFF);
         //commandChannel.flush();        
         }
       } 

More details as I figure out the NIO error message...

About

Hinkmond Wong's blog on making Machine to Machine (M2M) and the Incredible Internet of Things (IoT) smarter with Java Embedded Technologies

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today