Tag Archives: Arduino boards

Rewind: A look back at some of the original Arduino prototypes


While the shapes, colors and sizes of the earliest Arduinos may have varied, one thing has remained the same: Atmel at its heart.


During Memorial Day weekend, the first Arduino to be made in the U.S. was hand built by Limor Fried alongside Massimo Banzi in Adafruit’s New York City headquarters. The initial board off the production line — which seems appropriate to have been an Uno (meaning “one” in Italian) — comes just a few days after Banzi’s announcement at Maker Faire Bay Area of the company’s manufacturing partnership with Adafruit, the availability of the highly-anticipated Zero, as well as the launch of its new sister brand Genuino.

Uno

With the theme of “firsts” in mind, we couldn’t help but reflect upon the earlier years of Arduino and some of its prototypes. And upon conducting some research, we stumbled upon a photo album showcasing many of them. While their sizes, colors and shapes may have varied, one thing remained constant: they all had an Atmel chip at its heart. (As you can see, many of which powered by an ATmega8-16PU.)

So without further ado, let’s take a trip down memory lane.

Arduino Prototype 0

At this time, the board was still called

At the time, the board was called “Programma 2005” as an evolution of the “Programma 2003.” (Source: M. Banzi)

Arduino Extreme v1

First version of the SMD Arduino. Only 200 of these boards were produced. (Source: M. Banzi)

The first version of the SMD Arduino. Only 200 of these boards were produced. (Source: M. Banzi)

Arduino Bluetooth Prototype

The first prototype of the Arduino Bluetooth unit. The is module was never easy enough to use for beginner Makers, so only a couple were ever manufactured. (Source: M. Banzi)

The first prototype of the Arduino Bluetooth unit. The module was never easy enough to use for beginner Makers, and as a result, only a couple were ever manufactured. (Source: M. Banzi)

Custom Arduino Board – Lamp Controller

This custom Arduino features an iPod-like wheel sensor, an SMD Arduino, on-board RGB LEDs and three DSI outputs. (Source: M. Banzi)

This custom Arduino features an iPod-like wheel sensor, an SMD Arduino, on-board RGB LEDs and three DSI outputs. (Source: M. Banzi)

Arduino Prototype 1

There it is: The first useable prototype ever created. As you can see, it was still called

There it is: The first useable prototype ever created. As you can see, back then it was called “Wiring Lite” and used as a low-cost module for wiring users. (Source: M. Banzi)

Arduino Extreme v2

The second iteration of the Arduino USB board. (Source: M. Banzi)

The second iteration of the Arduino USB board. (Source: M. Banzi)

Arduino Ethernet Prototype

(Source: M. Banzi)

(Source: M. Banzi)

Arduino Bluetooth Proto 4

The pre-production prototype of the Arduino Bluetooth module. (Source: M. Banzi)

The pre-production prototype of the Arduino Bluetooth module. (Source: M. Banzi)

Arduino NG

Revision C of the Arduino NG did not have a built-in LED on pin 13. Instead, it featured two small unused solder pads near the labels

Revision C of the Arduino NG did not have a built-in LED on pin 13. Instead, it featured two small unused solder pads near the labels “GND” and “13.” (Source: M. Banzi)

Arduino Ethernet and PoE Prototype

(Source: M. Banzi)

In the album, this board was labeled “Secret Prototype.” Not longer after, Massimo would go on to spill the beans in its comment section. (Source: M. Banzi)

Arduino Zero

The Zero boasts an Atmel | SMART SAM D21 ARM Cortex-M0+ core, enabling the board to run much faster and pack more of a punch than its 8-bit counterparts.

The Zero boasts an Atmel | SMART SAM D21 ARM Cortex-M0+ core, enabling the board to run much faster and pack more of a punch than its 8-bit counterparts.

Want more? You can browse through the entire photo album here.

Arduino Day is quickly approaching!


Celebrate with us and our friends at SparkFun later this week. 


As Makers, there’s one special occasion that we just can’t help but love: Arduino Day! It is a 24-hour celebration — both official and independent — where hobbyists, tinkerers and even some experienced engineers from all over the world come together to share their DIY experiences. This year, the second annual ‘holiday’ is slated for Saturday, March 28, 2015.

Arduino_Day_2015_Twitter_600x300_032315

In 2014, more than 240 user groups, Makerspaces, hackerspaces, fablabs, schools, studios and educators throughout Europe, North and South America, Asia, Africa and Australia got involved in planning activities, workshops, and events for a wide-range of audiences and skill sets. Those needing a refresher can tune-in to Massimo Banzi’s official announcement from last year here.

“You can attend an event or organize one for your community. It doesn’t matter whether you are an expert or a newbie, an engineer, a designer, a crafter or a Maker: Arduino Day is open to anyone who wants to celebrate Arduino and all the things that have been done (or can be done) with it,” the team writes. “The events will offer different types of activities, tailored to local audiences all over the world.”

15818118830_6ec059da67_b

As far as official events are concerned, the company has organized five of them in Torino, Malmo, Bangalore, Boston and Budapest. Meanwhile, a number of local events have also been put together by the diehard ‘duino community. Among those is our meet-up in Niwot, Colorado with our friends at SparkFun Electronics, where we’ll be kicking off the festivities a day earlier on Friday, March 27. There, Atmel’s gigantic Tech on Tour Mobile Trailer will be parked in front of SparkFun’s headquarters packed with the latest (and greatest, if we may add) Maker, IoT, secure and connectivity demos.

Meet Atmel’s resident ‘Wizard of Make’ Bob Martin to talk about your latest DIY designs or ask questions around Atmel MCUs, which as you know, have been at the very heart of most Arduino boards since they hit the streets back in 2005. In fact, an ATmega8 was the chip of choice to power the very first prototype, long before the team coined the Arduino name after a local bar in Ivrea.

4441590461_26c63592a8_b

In addition to young Makers and educators, it’s no surprise that the open-source electronics platform has even become increasingly popular among the well-seasoned crowd. Even the most experienced engineers, designers and architects are welcomed to join our celebration!

Learn more about the festivities Atmel and SparkFun have planned. And, don’t forget to register! Ready to tinker? You can purchase some discounted boards to get started.

Arduino in research and biotech


Arduino’s acceptance into the biotech research community is evident from its increasing mentions in high-profile science and engineering journals. Mentions of Arduino in these journals alone have gone from zero to more than 150 in just in the last two years.


While it may be best known as staple for hobbyists, Makers, and hackers who build on their own time, Arduino and Atmel have a strong and rapidly growing following among professional engineers and researchers.

For biotech researchers like myself, experimental setups often require highly specific instruments with strict design rules for parameters such as timing, temperature, motion, force/pressure, and light. Such specific instruments would be time-consuming and expensive to have custom built, as the desired experimental conditions often change as we investigate different samples, cell types, etc. Here, Atmel chips and Arduino boards find a nice niche for making your own affordable, custom setups that are repeatable, precise, and automated. Arduino and Atmel provide microcontrollers in a myriad of form factors, I/O options, and connectivity that are available from a number of vendors. Meanwhile, freeware Arduino code and hardware drivers are also available with many sensors and actuators to go with your board. Best of all, Arduino is designed for a wide audience and range of experiences, making it easy to use for a variety of projects and complexities. So as experimental conditions or goals change, your hardware can easily be re-purposed and re-programmed according to specifications.

Arduino’s acceptance into the biotech research community is evident from its increasing mentions in high profile journals in science and engineering including Nature Methods, Proceedings of the National Academy of the SciencesLab on a Chip, Cell, Analytical Chemistry, and the Public Library of Science (PLOS). Mentions of Arduino in these journals alone have gone from zero to more than 150 in just in the last two years.

In recent years, Arduino-powered methods have started to appear in a variety of cutting edge biotechnology applications. One prominent example is optogenetics, a field in which engineered sequences of genes can be turned on and off using light. Using Arduino-based electronic control over lights and motors, researchers have constructed tools to measure how the presence or absence of these gene sequences can produce different behaviors in human neurons [1][6][7] or in bacterial cells [2]. Light and motor control has also allowed for rapid sorting of cells and gene sequences marked with fluorescent dyes, which can be detected by measuring light emitted to photodiodes. While the biology driving this research is richly complex and unexplored, the engineering behind the tools required to observe and measure these phenomena are now simple to use and well-characterized.

Neuroscientists Voights, Sanders, and Newman at the Open Ephys project provide walkthroughs and add-ons for using Arduino to help them create tools for probing cells.  From left to right, Arduino-based hardware for creating custom electrodes, providing multi-channel input to neurons, and for control over optogenetic lighting circuits.  [6],[7]

Neuroscientists Voights, Sanders, and Newman at the Open Ephys project provide walkthroughs and add-ons for using Arduino to help them create tools for probing cells. From left to right, Arduino-based hardware for creating custom electrodes, providing multi-channel input to neurons, and for control over optogenetic lighting circuits. [6],[7]

Neuroscientists Voights, Sanders, and Newman at the Open Ephys project provide walkthroughs and add-ons for using Arduino to help them create tools for probing cells. From left to right, Arduino-based hardware for creating custom electrodes, providing multi-channel input to neurons, and for control over optogenetic lighting circuits. [6],[7]

Arduino-based automation can be used for supplanting a number of traditional laboratory techniques including control of temperature, humidity, and/or pressure during cell culture conditions; monitoring cell culturing through automated sampling and optical density measurements over time; neurons sending and receiving electrochemical signals; light control and filtration in fluorescence measurements; or measurement of solution salinity. This kind of consistent, automated handling of cells is a key part of producing reliable results for research in cell engineering and synthetic biology.

Synthetic biologists Sauls et al. provide open-source schematics for creating an Arduino-powered turbidostat to automate the culturing of cells with recombinant genes. [5]

Synthetic biologists Sauls et al. provide open-source schematics for creating an Arduino-powered turbidostat to automate the culturing of cells with recombinant genes. [5]

Synthetic biologists Sauls et al. provide open-source schematics for creating an Arduino-powered turbidostat to automate the culturing of cells with recombinant genes. [5]

Arduino has also found an excellent fit in the microfluidics communityMicrofluidics is the miniaturization of fluid-handling technologies—comparable to the miniaturization of electronic components. The development of microfluidic technologies has enabled a myriad of technical innovations including DNA screening microchips, inkjet printers, and the screening and testing of biological samples into compact and affordable formats (often called “lab on a chip” diagnostics) [3]. Their use often requires precise regulation of valves, motors, pressure regulation, timing, and optics, all of which can be achieved using Arduino. Additionally, the compact footprint of the controller allows it to be easily integrated into prototypes for use in medical laboratories or at the point of care. Recent work by the Collins and Yin research groups at MIT has produced prototypes for rapid, point-of-care Ebola detection using paper microfluidics and an Arduino-powered detection system [4].

Microfluidic devices made from paper (left) or using polymers (right) have been used with Arduino to create powerful, compact medical diagnostics (Left: Ebola diagnostic from Pardee et. Al [4], Right: Platelet function diagnostic from Li et al. [9])

Microfluidic devices made from paper (left) or using polymers (right) have been used with Arduino to create powerful, compact medical diagnostics (Left: Ebola diagnostic from Pardee et. Al [4], Right: Platelet function diagnostic from Li et al. [9])

Microfluidic devices made from paper (left) or using polymers (right) have been used with Arduino to create powerful, compact medical diagnostics (Left: Ebola diagnostic from Pardee et. Al [4], Right: Platelet function diagnostic from Li et al. [9])

Finally, another persistent issue in running biological experiments is continued monitoring and control over conditions, such as long-term time-lapse experiments or cell culture.   But what happens when things go wrong? Often this can require researchers to stay near the lab to check in on their experiments. However, researchers now have access to on-board wi-fi control boards [8] that can send notifications via email or text when their experiments are completed or need special attention.  This means fewer interruptions, better instruments, and less time spent worrying about your setup.

The compact Arduino Yun microcontroller combines the easy IDE of Arduino with the accessibility of built-in wi-fi to help you take care of your experiments remotely [8]

The compact Arduino Yun microcontroller combines the easy IDE of Arduino with the accessibility of built-in wi-fi to help you take care of your experiments remotely [8]

True to Arduino’s open-source roots, the building, use, and troubleshooting of the Arduino-based tools themselves are also available in active freeware communities online [5]–[7].

Simply put, Arduino is a tool whose ease of use, myriad applications, and open-source learning tools have provided it with a wide and growing user base in the biotech community.


Melissa Li is a postdoctoral researcher in Bioengineering who has worked on biotechnology projects at UC Berkeley, the Scripps Research Institute, the Massachusetts Institute of Technology, Georgia Institute of Technology, and the University of Washington. She’s used Arduino routinely in customized applications in optical, flow, and motion regulation, including a prototype microfluidic blood screening diagnostic for measuring the protective effects of anti-thrombosis medications [9], [10]. The opinions expressed in this article are solely her own and do not reflect those of her institutions of research.

[1]       L. J. Bugaj, A. T. Choksi, C. K. Mesuda, R. S. Kane, and D. V. Schaffer, “Optogenetic protein clustering and signaling activation in mammalian cells,” Nat. Methods, vol. 10, no. 3, pp. 249–252, Mar. 2013.

[2]       E. J. Olson, L. A. Hartsough, B. P. Landry, R. Shroff, and J. J. Tabor, “Characterizing bacterial gene circuit dynamics with optically programmed gene expression signals,” Nat. Methods, vol. 11, no. 4, pp. 449–455, Apr. 2014.

[3]       E. K. Sackmann, A. L. Fulton, and D. J. Beebe, “The present and future role of microfluidics in biomedical research,” Nature, vol. 507, no. 7491, pp. 181–189, Mar. 2014.

[4]       K. Pardee, A. A. Green, T. Ferrante, D. E. Cameron, A. DaleyKeyser, P. Yin, and J. J. Collins, “Paper-Based Synthetic Gene Networks,” Cell.

[5]       “Evolvinator – OpenWetWare.” [Online]. Available: http://openwetware.org/wiki/Evolvinator. [Accessed: 12-Jan-2015].

[6]       “Open Ephys,” Open Ephys. [Online]. Available: http://www.open-ephys.org/. [Accessed: 12-Jan-2015].

[7]       Boyden, E. “Very simple off-the-shelf systems for in-vivo optogenetics”. http://syntheticneurobiology.org/protocols/protocoldetail/35/9 [Accessed: 12-Jan-2015].

[8]       “Arduino Yun”. http://arduino.cc/en/Guide/ArduinoYun [Accessed: 12-Jan-2015].

[9]       “Can aspirin prevent heart attacks? This device may know the answer,” CNET. [Online]. Available: http://www.cnet.com/news/can-aspirin-prevent-heart-attacks-this-device-may-know-the-answer/. [Accessed: 12-Jan-2015].

[10]       M. Li, N. A. Hotaling, D. N. Ku, and C. R. Forest, “Microfluidic thrombosis under multiple shear rates and antiplatelet therapy doses.,” PloS One, vol. 9, no. 1, 2014.

 

The Maker Movement is shaping the future

It is no secret that the Maker Movement is gaining a foothold in modern society. Writing for Newsweek, Louise Stewart highlights how the blossoming DIY culture is being adopted in schools across the nation.

09-12educationmakermovement02

In her article, Louise highlights High Tech High (you read that right!) in San Diego. The school resembles a set from a Pixar movie more than a typical, drab American high school. With spinning pulley systems turning a massive clock and a glass-covered piano front and center, it is obvious this isn’t your ordinary venue of education. Created 14 years ago, CEO and Founding Principal Larry Rosenstock describes the charter school’s core principal as “kids making, doing, building, shaping and inventing stuff” without the focus of one single subject.

Today, a growing number of schools (and other educational venues such as museums) are creating new programs and spaces to enable a greater convergence of both art and technology. Many would compare this “new industrial revolution” as the combination of the old shop class spirit with modern-day technology in do-it-yourself spaces.

With the High Tech High’s wide-open learning process, projects can revolve around history, engineering, and physics all at once; instead of segmented pieces. Stewart notes that some of the previous displays at the school have included “a World War I–era restaurant and cabaret, an art gallery, a museum-like exhibit on the history and physics of baseball, [and] simulations of faraway ecologies.” Talk about variety!

Tony Wagner, a resident at Harvard’s Innovation Lab calls High Tech High his “favorite” school and that other educational institutions with Makerspaces are the future. The Newsweek piece details how not just charter schools are seeing the benefit of the growing Maker Movement, evident by the widespread audience at Maker Faires throughout the world.

Bn3Ct3EIMAAGRid

Stewart reveals how one student at St. Ann’s School in Brooklyn, New York was so inspired by an in-class 3D printing project that he was motivated to purchase his own 3D printer for use at home. Soon, he was designing and printing iPhone cases and his favorite gadgets from video games.

Even public schools are getting in on the act, as Albemarle County Public School’s Superintendent Pam Moran describes her outlook on today’s education as attempting to “make learning so powerful and memorable” and encourage students to be “constantly looking at the world in terms of problems that they can solve.”

As the global Maker Movement continues to converge education and technology, we have to note the youth aren’t the only ones taking advantage of the DIY revolution.

quintruck1

Writing for the Huffington PostAnna Clark details the story of Charlie Lindahl, who learned computer programming in ’68 and ’69 with a modem using an interactive terminal back when everyone was using batch processing with punched cards. “Trying to explain this to people was like being an alien.”

Charlie plans to roll out a startup MerryMaker Labs where a “No Fear Electronics” curriculum will be adopted. Charlie’s goal is to minimize any trepidation an individual would have when thinking about taking a step into the Maker world. Have no fear Makers!

Why are we teaching people to make quirky new gadgets out of old and random stuff? “Because it’s fun!” says Lindahl.

As Clark points out, DIY isn’t just for people with nothing better to do; in fact, it’s for anyone and everyone who are intentional about learning, achievement and skills mastery. From the outset of the Maker Movement, coders, knitters, mechanics, electronics tinkerers, masters of the new 3D printing process, apprentices of digital fabrication and even die-hard engineers are turning to Atmel powered devices to bring their ideas to life — maybe that’s a braille printer, a retro robot, a marshmallow canon, or even a prototype of the next big Internet of Things gadget.

When you put it like that, the popularity of the Maker Movement makes perfect sense. “See, when a system stops working — say American manufacturing — doldrums can drag on for years. As certain careers disappear and new roles emerge, folks in transition are wondering, ‘Is there something else out there that I can do?'” asks Lindahl.

Some Makers are constructing new careers as they construct new gadgets. Some Makers are skilled artisans seeking a supportive or collaborative community. Some Makers are hobbyists interested in the robotics wave. Heck, some Makers are even hip-hop artists, musicians and professional athletes. This is what makes the DIY culture so special and ubiquitous.

Bn8a1nrIYAAdhCR.jpg-large

“And some savvy startups are creating kits to simplify the process. littleBits makes prototyping with electronics simple and fun, like putting together a puzzle. Arduino is an inexpensive microcontroller that can be used for many small DIY or physical and wearable computing projects. Adafruit is a company that sells the pieces and makes the tutorials. Among other things, you can sew your own owl,” the Huffington Post article accentuates.

With more and more creative individuals being given opportunities to explore their innovative habits, the Maker Movement likely won’t be slowing down anytime soon. We can expect to see more people, ranging from hobbyists to embedded designers, turn to creating products instead of only consuming them. This is the future. And, this is fun!

Will you be joining us for World Maker Faire in New York? Don’t miss the panel discussion, “Curiosity, Imagination and Motivation: The Natural Inclinations of Young Makers,” with Atmel’s Bob Martin and Daniel Ujvari, Arduino’s Massimo Banzi, Qtechknow’s Quin Etnyre and littleBits’ Ayah Bdeir, as they explore the ways in which the STEM initiative and Maker Movement are influencing young Makers and helping to create tomorrow’s industry innovators.

Vegard Wollan reflects on AVR and Arduino

In this segment of my chat with Vegard Wollan, the co-inventor of the AVR explores the symmetry between the highly-popular microcontroller and the Arduino development board.

Personally, one of the great moments was when Vegard revealed that the entire AVR product line was meant from the start to be easy-to-use. This began with the instruction set, the architecture and continues to this day with things like Atmel Studio 6 integrated development environment (IDE), Atmel Spaces collaborative workspace, and Atmel Gallery, the place where you can find thousands of code samples and tutorials.

Vegard-Wollen_Paul-Rako_AVR-ease-of-use

Vegard Wollan gestures to the AVR schematics as he explains to Paul Rako how ease of use was a primary design goal from the start.

So it is only natural that Arduino was built on this foundation to make their great ecosystem of development boards and their wonderful IDE. You can see Vegard truly appreciates and respects how Massimo Banzi made the entry into AVR programming even easier for both technical and non-technical folks alike.

Today, AVR 8-bit MCUs (as well as Atmel 32-bit ARM®-based MCUs) power a variety of Arduino’s easy-to-use boards including:

  • Arduino Uno: The most “standard” board currently available, the Uno is based on the ATmega328
  • Arduino Yún: The Yún is a microcontroller board based on the ATmega32u4 (datasheet) and the Atheros AR9331.
  • Arduino Nano: The Nano is a small, complete, and breadboard-friendly board based on the ATmega328.
  • Arduino Mega 2560: The version of the Mega released with the Uno, this version features the ATmega2560, which has twice the memory, and uses the ATmega 8U2 for USB-to-serial communication.
  • Arduino Leonardo: Based on the ATmega32u4, the Leonardo is a low-cost Arduino board, featuring the same shape and connectors as the Uno board but with a simpler circuit.
  • Arduino Micro: The Micro is based on the ATmega32u4, developed in conjunction with Adafruit.
  • Arduino Esplora: Derived from the Arduino Leonardo, the Esplora is a ready-to-use, easy-to-hold controller based on the ATmega32u4.
  • Arduino LilyPad: Powered by an ATmega32u4, the LilyPad is designed for wearables and e-textiles, allowing for the board to be sewn into fabric and similarly mounted power supplies, sensors and actuators with conductive thread.
  • Arduino Due: Based on an Atmel ARM Cortex®-M3 processor-based MCU — also known as the SAM3 MCU — the Due board is ideal for home automation projects and can run up to 96MHz.
  • Arduino Wi-Fi Shield: Built for Wi-Fi applications, the Arduino Wi-Fi shield is powered by the Atmel AVR UC3 MCU and an H&D wireless module, and provides developers a powerful Wi-Fi interface.
  • Arduino Zero: The board is powered by an Atmel SAM D21 MCU, which features a 32-bit ARM Cortex® M0+ core.

If you haven’t had the chance to tune-in to all of Vegard’s 1:1 interviews with the Atmel Analog Aficionado, you can check ’em out here.

Building real-time monitoring for IoT device state

You may have a couple Arduinos, or billions of IoT devices connected in a single instance. A common need today is the requirement to detect when devices are turned on and turned off, also known as device state. And, monitoring the device state of connected devices and machines in real-time is called presence.

In this blog post, we’ll walk you through how to use presence to monitor IoT devices and hardware connected with PubNub (for both Java and JavaScript).

PresenceIotDevices

Why You Need to Monitor Your IoT Devices in Real-Time

IoT hardware comes in all shapes, sizes, and prices. But despite their differences, monitoring device state is essential, and we need to know exactly when they’re online and offline. Say you have an (Atmel based) Arduino hooked up to your apartment doorbell for whatever reason. Your Arduino goes offline, the pizza man is standing outside, and you’re not eating. Or maybe the situation is more dramatic. You may have hundreds of IoT devices hooked up to manage your farm. Keeping tabs on those devices is vital for the health of your farm, and you need to know when they go offline.

Device Monitoring Using Presence

We’ll first walk you through using Presence for IoT devices with Java, then move onto JavaScript. With both, you’ll first need to sign up for a PubNub account. Once you sign up, you can get your unique PubNub keys in the PubNub Developer Portal. In the developer’s portal, click to enable Presence. Feel free to play around as much as you want in our free Sandbox tier.

Check out our simulated Presence demo to get a better idea of how Presence can be used for real-time monitoring of Internet of Things devices.

Java

Step 1: Presence and here_Now() are two features of PubNub that update device or user state in real-time. Whether you choose to use JavaScript or the PubNub Java Presence SDK, the output for Presence is the same. You will get an output in this format:

{"message":"OK","status":200,"uuids":["uuid1"],"service":"Presence",
"occupancy":1}

where “uuids” contains a list of the uuids online and occupancy gives the number of online users.

I will be using the code feature to see ‘who’s there?’. All you need to provide is the channel name, and then check if there is anyone on that channel. The code sample below is basic usage.

pubnub.hereNow("my_channel", new Callback() {
     public void successCallback(String channel, Object response) {
         System.out.println(response);
     }
     public void errorCallback(String channel, PubnubError error) {
         System.out.println(error);
     }
 });

This will output the devices that are online which is identified by the UUIDs. In order to consume this information, all you need is to modify the callback function a little. The following code shows you how:

Step 2:

Callback callback = new Callback() {
	public void successCallback(String channel, Object response) {
	    String temp = response.toString();
	    int start = temp.indexOf('[');
	    int end = temp.indexOf(']');
	    for(int index = start+1;index<end;index++){
		    if(temp.charAt(index)!=','){	
		    	uuid1 = uuid1 + temp.charAt(index);
		    }
		    else{
		    	System.out.println();
		    }
	    }
    	String replaced = uuid1.replace("\""," ");
    	String[] uuidlist = replaced.split("\\s+");
    	for (String tempstring : uuidlist){
    		System.out.println(tempstring);
    	}	
	}
		
	public void errorCallback(String channel, PubnubError error){
		System.out.println(error.toString());
	}
};
	
	public void herenow(){
		Pubnub pubnub = new Pubnub("demo", "demo");
		pubnub.hereNow("my_channel", callback);
	}

This code, modifies the information received by the hereNow function, and stores and prints it in an array called ‘uuidlist’. In this manner, you can now use this information according to your requirements.

JavaScript

Step 1: The PubNub JavaScript Presence feature is an optional parameter used along with the subscribe call in JavaScript. The code sample below is basic usage:

pubnub.subscribe({
     channel: "my_channel",
     presence: function(m){console.log(m)},
     callback: function(m){console.log(m)}
 });

The presence feature will output the devices that are online as identified by their UUIDs, along with their timestamp, an action that indicates join/leave/timeout and the occupancy of the channel. This information will be displayed in the console.

But what if you want to consume this information by publishing it to a screen or store it somewhere? The following code lets you do just that.

Step 2: Now we’ll bring the presence to life with JavaScript

var deviceList[],
devices =[];

pubnub.subscribe({

    channel: 'my_channel',
    presence: function(message,channel){
        if(message.action == "join"){
        	devices.push(message.uuid);
    		deviceList.append("<li text-align:
    		center>" + message.uuid + "</li>");
      		}
        else{
          devices.splice(devices.indexOf(message.uuid), 1);
          deviceList.find(message.uuid).remove();
	}
 }
});

Here, we define a custom function for presence which basically uses the different actions of a presence event that could occur, such as join, timeout and leave.

  • If a ‘join’ occurs, we append the UUID to the list of devices that are online.
  • If a ‘leave or a timeout’ occurs, we remove that UUID from the list of list of devices that are online.

You now have the online users, both in an array called ‘devices’ and also as list printed on a page.

This way, you can now be updated on the different devices joining and leaving your network in real-time.

You can check out the PubNub JavaScript Presence documentation here.

Additional PubNub Presence Resources

20 Arduino Zero available for beta testing

If you recall back at Maker Faire Bay Area, we teamed up with Arduino to debut the Zero, a 32-bit development board powered by Atmel’s ARM-based SAMD21 microcontroller.

Bn4AIAmIYAA2PVB

The Zero board expands the Arduino family by providing increased performance to fuel the creativity of the Maker community,” explained Massimo Banzi, Arduino Co-Founder and CEO.

Additional key hardware specs include 256kb of flash, 32kb SRAM in a TQFP package and compatibility with 3.3V shields that conform to the Arduino R3 layout. The Arduino Zero board also boasts flexible peripherals along with Atmel’s Embedded Debugger (EDBG) – facilitating a full debug interface on the SAMD21 without the need for supplemental hardware.

arduino_zero_overhead_top_53952

And now for even bigger news…

After the success of its other beta programs, our friends at Arduino have announced that starting today, there will be a limited batch of 20 Arduino Zero available for Makers wanting to test the board.

According to Arduino, “The ideal beta-tester has time and interest in working on some specific issues we hope to accomplish with the beta-testing: we set up a list of tasks including writing examples, testing libraries and external hardware, and making projects that can be completed in a variety of timeframes.”

Arduino_Zero_Rear450

“Ultimately, our goal is to make the Zero welcoming to non-technical customers and useful for tech-savvy customers at the same time, like all of our products. To that end, we’d like feedback from you, as beta testers, about where we could simplify for beginners and explain or document better,” Arduino notes in its latest blog post.

Those interested in participating in the beta program are encouraged to fill out this application by August 17th. 20 applicants will be selected on August 21st to partake in the beta-testing phase, which is slated to last one month, ending around the start of Maker Faire New York.

For more information, you can head on over to Arduino’s original blog post here.