Total Pageviews

11/28/2014

Diesel generator engine cold start after 10 years in bunker. GRAUZTI.LV ...

11/26/2014

Maria Butina, Chairman of the Russian organization The Right to Bear Arms

B43 & B57 Nuclear Bombs: Mark 43 & Mark 57 Weapons Shipboard Handling 19...

11/09/2014

COMMENT: Putin, Ukraine and asymmetric politics Mark Galeotti of New York University April 14, 2014

"These conflicts will be won by whoever is able to force their enemies to play to their rules, and by whoever best understands that military force is often the least important kind of power. Like the Great Game, the struggles will be fought using deniable covert actions, political misdirection, economic leverage, propaganda, espionage, hackers, mercenary agents and useful dupes. In the 19th century, wily tribal warlords would sell their services to the highest bidder; today, it is the political elites of Donetsk and Kharkiv. Being able to leak an embarrassing phone conversation at just the right moment (just ask Victoria Nuland) or to have the means to incite local paramilitaries will be more effective than a whole aircraft carrier’s fighter wing."

http://www.bne.eu/content/story/comment-putin-ukraine-and-asymmetric-politics

10/22/2014

Thyroid Issues

http://www.mindbodygreen.com/0-7588/10-signs-you-have-a-thyroid-problem-and-10-solutions-for-it.html

It's estimated that as many as 25 million Americans have a thyroid problem, and half of them have no idea that they do. Hypothyroidism, or an under-active thyroid, accounts for 90% of all thyroid imbalances.

The thyroid, a butterfly-shaped gland in the center of your neck, is the master gland of metabolism. How well your thyroid is functioning is inter-related with every system in your body. If your thyroid is not running optimally, then neither are you.

Here are 10 signs that you could have an underactive thyroid:

1. Fatigue after sleeping 8 to 10 hours a night or needing to take a nap daily.

2. Weight gain or the inability to lose weight.

3. Mood issues such as mood swings, anxiety or depression.

4. Hormone imbalances such as PMS, irregular periods, infertility and low sex drive.

5. Muscle pain, joint pain, carpal tunnel syndrome, or tendonitis.

6. Cold hands and feet, feeling cold when others are not, or having a body temperature consistently below 98.5.

7. Dry or cracking skin, brittle nails and excessive hair loss.

8. Constipation.

9. Mind issues such as brain fog, poor concentration or poor memory.

10. Neck swelling, snoring or hoarse voice.

How does you thyroid gland work?

Thyroid hormone production is regulated by a feedback loop between the hypothalamus, pituitary gland and the thyroid gland. Hypothalamic thyrotropin-releasing hormone (TRH) stimulates pituitary thyrotropin (TSH) synthesis and secretion.

In turn, TSH stimulates production and release of T4 and T3 from the thyroid gland. When enough T4 is produced, it signals to TRH and TSH that there is enough thyroid hormone in circulation and not to produce more.

About 85% of the hormone produced by our thyroid gland is T4, which is an inactive form of the hormone. After T4 is made, a small amount of it is converted into T3, which is the active form of thyroid hormone.

To complicate matters, T3 also gets converted into either Free T3 (FT3) or Reverse T3 (RT3). It's the Free T3 that really matters in all of this, since it's the only hormone that can attach to a receptor and cause your metabolism to rise, keep you warm, keep your bowels moving, mind working, and other hormones in check. The role of Reverse T3 is not well known, however, I do see it elevated in persons under extreme stress and those who have mercury toxicity.

And finally, Hashimoto’s thyroiditis, an autoimmune disease, is the most common form of hypothyroidism and its numbers are rising annually. An autoimmune disease is one in which your body turns on itself and begins to attack a certain organ or tissue believing its foreign.

I routinely screen all of my patients for autoimmune thyroid disease by ordering Thyroid Peroxidase Antibodies (TPOAb) and Thyroglobulin Antibodies (TgAb).
 
Why is hypothyroidism so under diagnosed in the USA?

Many symptoms of thyroid imbalance are vague and most doctors spend only a few minutes talking with patients to sort out the cause of their complaint.

Most conventional doctors use only one or two tests (TSH and T4) to screen for problems. They are not checking FT3, RT3 or thyroid antibodies.

Most conventional doctors use the ‘normal’ lab reference range as their guide only. Rather than listening to their patients symptoms, they use ‘optimal’ lab values and temperature as their guide.

Which lab tests are best to determine if you have a thyroid problem?

I check the below panel on each of my patients. Make sure your doctor does the same for you.
TSH
Free T4
Free T3
Reverse T3
Thyroid Peroxidase Antibodies (TPOAb)
Thyroglobulin Antibodies (TgAb)
What are the ‘optimal’ lab values for thyroid tests?

In my practice, I have found that the below are the ranges in which my patients (and myself) thrive.  I listen to my patients as well and take how they are feeling into account.
TSH 1-2 UIU/ML or lower (Armour or compounded T3 can artificially suppress TSH)
FT4  >1.1 NG/DL
FT3 > 3.2 PG/ML
RT3 less than a 10:1 ratio RT3:FT3
TPO – <9 IU/ML or negative
TgAb - < 4 IU/ML or negative
What are 10 things you can do to improve your thyroid function?

1. Make sure you are taking a high quality multivitamin with Iodine, Zinc, Selenium, Iron, Vitamin D and B vitamins.

2. Take a tyrosine and iodine supplement to help with the FT4 to FT3 conversion.

3. Go gluten-free! If you have Hashimoto’s, try going completely grain and legume free.

4. Deal with your stress and support your adrenal glands. The adrenal glands and thyroid work hand and hand. I recommend restorative yoga and adaptogenic herbs, which support the adrenal glands in coping with stress.

5. Get 8 to 10 hours of sleep a night.

6. Have a biological dentist safely remove any amalgam fillings you may have.

7. Watch your intake of cruciferous vegetables. There is a bit of a debate surrounding this.

8. Get fluoride, bromide and chlorine out of your diet and environment.

9. Heal your gut. A properly functioning digestive system (gut) is critical to good health. To learn more, click here.

10. Find a functional medicine doctor in your area and have them run the above laboratory test and work with you to find our root cause of the thyroid imbalance.
Photo Credit: Shutterstock.com

Fibromyalgia

http://www.mindbodygreen.com/0-10103/10-causes-of-fibromyalgia-your-doctor-doesnt-know-about.html

It's estimated that fibromyalgia affects approximately 10 million people in the United States. Fibromyalgia is classically characterized by chronic pain, particularly muscle pain, fatigue, sleep disturbances, brain fog or cognitive impairment, depression and painful tender points throughout the body.

Conventional medicine has yet to uncover the cause of fibromyalgia and only offers management of symptoms through pain medications and antidepressants.

Functional medicine, on the other hand, looks to find the root cause of fibromyalgia and other chronic diseases, treating the problem at the root level to restore the patient to health. As a functional medicine physician, I've helped many patients recover from fibromyalgia.  Below are the top ten root causes of fibromyalgia I see in my clinic.

1. Gluten intolerance

Gluten has been liked to more than 55 diseases and is often called the "big masquerader." The reason for this is that the majority of gluten intolerance symptoms are not digestive in nature, but are instead neurological, such as pain, cognitive impairment, sleep disturbances, behavioral issues, fatigue and depression.

2. Candida overgrowth

Candida is a fungus, or yeast, and a very small amount of it lives in your intestines. When overproduced, Candida breaks down the wall of the intestines and penetrates the bloodstream, releasing toxic byproducts into your body and causing a host of unpleasant symptoms such as brain fog, fatigue, digestive issues and pain. Virtually every one of my patients with fibromyalgia has had Candida overgrowth.

3. Thyroid

It's vital that your doctor check all six blood markers to accurately measure your thyroid gland’s function. It’s also imperative that your doctor use the optimal levels rather than the standard reference range when assessing and diagnosing thyroid disorders. Getting my patient’s thyroid levels into an optimal range typically alleviates their fatigue, brain fog, sleep disturbances and depression.

4. Vitamin deficiencies

Magnesium, vitamin D and B12 deficiency are the most common vitamin deficiencies I see in those who have been diagnosed with fibromyalgia. I've had several patients completely reverse their fibromyalgia symptoms with magnesium alone. The best way to measure magnesium is a red blood cell (RBC) magnesium level, which can be tested through any conventional lab.

5. Small Intestine Bacterial Overgrowth (SIBO) and Leaky gut

There are more bacteria in us and on us then there are of our own cells. When these bacteria get out of balance through use of antibiotics or a sugar-rich diet, we can lose our ability to digest and absorb nutrients, particularly B12. Gluten can cause SIBO and leaky gut and SIBO and leaky gut can lead gluten and other food intolerances. It’s a catch-22 and a vicious cycle. You must "fix the gut" first in anyone with fibromyalgia.

6. Mycotoxins

Mycotoxins are very toxic substances produced by molds. Conventional environmental mold testing only tests for levels of mold spores and does not test for mycotoxins. I use a urine mycotoxin test in my clinic to determine if someone has been exposed to toxic molds.

7. Mercury toxicity

I recommend that all my patients find a biological dentist and have their mercury amalgam fillings removed. Mercury is toxic to our bodies and can be one piece of the puzzle for those with fibromyalgia. I then recommend heavy metal testing using a pre- and post-DMPS urine challenge test.

8. Adrenal fatigue

Adrenal fatigue is a result of the chronic stress. Chronic pain is a stress to the adrenal glands, though it's typically not the initial adrenal stressor. The initial stressor is usually something such as food intolerances, Candida, mercury toxicity, vitamin deficiencies or mycotoxins. My goal is to support the adrenals with adaptogenic herbs while we search for the root cause of the stress and correct it.

9. MTHFR mutations

This is a genetic test you can get though any conventional lab. The more mutations you have to the MTHFR gene the less able you are to methylate and detoxify toxins, such as mercury and lead. The more mutations you have at this gene the higher your requirements for methyl-B6, methyl-B12 and folinic acid in order to keep your detoxification pathways working properly.

10. Glutathione deficiency

Glutathione is the most critical part of our body’s detoxification system. Glutathione gets recycled in our body — unless our toxic burden gets too high, or we lack GSTM1 and GSTP1, the enzymes needed to recycle and produce glutathione. Taking glutathione or the precursors (NAC, alpha lipoic acid, milk thistle) often help dramatically with fatigue.

As you can see from the above list, many of these causes are interrelated, and often there's no single root cause of fibromyalgia. Because getting to the root can be complex, I recommend that you find a functional medicine physician in your area to help uncover the root cause for you. You don't need to suffer needlessly or mask your symptoms with pain medications and antidepressants. There are doctors likes myself who can help you!

10/02/2014

The $1,200 Machine That Lets Anyone Make a Metal Gun at Home | WIRED

The $1,200 Machine That Lets Anyone Make a Metal Gun at Home | WIRED: "The $1,200 Machine That Lets Anyone Make a Metal Gun at Home
BY ANDY GREENBERG   10.01.14  |   6:30 AM  |   PERMALINK
Share on Facebook9.3k

inShare
91 11

An AR-15 lower receiver created with Defense Distributed’s CNC mill, the Ghost Gunner. Defense Distributed

When Cody Wilson revealed the world’s first fully 3-D printed gun last year, he showed that the “maker” movement has enabled anyone to create a working, lethal firearm with a click in the privacy of his or her garage. Now he’s moved on to a new form of digital DIY gunsmithing. And this time the results aren’t made of plastic.

Wilson’s latest radically libertarian project is a PC-connected milling machine he calls the Ghost Gunner. Like any computer-numerically-controlled (or CNC) mill, the one-foot-cubed black box uses a drill bit mounted on a head that moves in three dimensions to automatically carve digitally-modeled shapes into polymer, wood or aluminum. But this CNC mill, sold by Wilson’s organization known as Defense Distributed for $1,200, is designed to create one object in particular: the component of an AR-15 rifle known as its lower receiver.

That simple chunk of metal has become the epicenter of a gun control firestorm. A lower receiver is the body of the gun that connects its stock, barrel, magazine and other parts. As such, it’s also the rifle’s most regulated element. Mill your own lower receiver at home, however, and you can order the rest of the parts from online gun shops, creating a semi-automatic weapon with no serial number, obtained with no background check, no waiting period or other regulatory hurdles. Some gun control advocates call it a “ghost gun.” Selling that untraceable gun body is illegal, but no law prevents you from making one.

Exploiting the legal loophole around lower receivers isn’t a new idea for gun enthusiasts—some hobbyist gunsmiths have been making their own AR-15 bodies for years. But Wilson, for whom the Ghost Gunner is only the latest in a series of anti-regulatory provocations, is determined to make the process easier and more accessible than ever before. “Typically this has been the realm of gunsmiths, not the casual user. This is where digital manufacturing, the maker movement, changes things,” he says. “We developed something that’s very cheap, that makes traditional gunsmithing affordable. You can do it at home.”"



'via Blog this'

Ghost Gunner

Ghost Gunner: "Open Source Hardware
Ghost Gunner is a non-profit open source hardware effort by Defense Distributed. Ghost Gunner builds on the open source community's existing hard work, including the gshield 3 axis motion hardware, the grbl g-code parser and motion controller, and the legendary Arduino microcontroller. All GhostGunner schematics and design files will be published into the public domain. Defense Distributed decided to build our own machine from the ground up. We found existing CNC machines too expensive, too DIY, or too inaccurate to manufacture firearms for the casual user. By miniaturizing the build envelope to just large enough to mill common firearm receivers, we were able to improve rigidity, reduce material cost and simultaneously relax some design limits, allowing us to sell an inexpensive machine with more than enough accuracy to manufacture firearms.

Ghost Gunner has undergone several design revisions to reduce machine chatter, backlash, and jitter, all with the goal of keeping total design cost low. Rather than using plastic, wood, or even an aluminum frame, Ghost Gunner is constructed with maximally rigid plasma-cut A36 steel and 304 stainless steel. In addition, the machine part count is greatly reduced compared to a traditional CNC, which both increases rigidity and further decreases cost. The end result is a small, cheap, and simple machine that exceeds most consumer-priced CNC machine specifications."



https://ghostgunner.net/



'via Blog this'

Ghost Gunner

9/19/2014

The Next Phase: 3D Printed Imura Revolver Hybrid Development - The Truth About Guns

The Next Phase: 3D Printed Imura Revolver Hybrid Development - The Truth About Guns: "The Next Phase: 3D Printed Imura Revolver Hybrid Development
By Dean Weingarten on September 15, 2014

An innovative 3D-printed hybrid revolver design is being worked on as tribute to 3D printing’s first martyr,  Yoshito Imura. Imura was arrested for printing some plastic, blank-firing guns in Japan. The new design would fire from the bottom of the cylinder, as did the original blank-firing plastic gun.  The new revolver has hybrid features, including a steel barrel liner and chamber sleeves . . .



As seen in this computer image of the developing design, the revolver is meant to be double action; that is, one pull of the trigger will rotate the cylinder, cock the striker and release it, firing the charge, whether it’s cap and ball, blank cartridge, or conventional round.

"



'via Blog this'

9/15/2014

Stop The Cyborgs | Only the unmeasured is free.

Stop The Cyborgs | Only the unmeasured is free.: "
Überveillance | Think of it as big brother on the inside looking out

London authorities have started forcing people convicted of alcohol related crime to wear ankle tags which monitor the alcohol content of their perspiration alerting the offenders probabation officer if they drink. Meanwhile in a healthcare and by extension health insurance context. Proteus digital health have developed a system where  wearable and ingestible sensors work together to gather information about treatment compliance. (The system uses technology similar to the ingestable password pill that Motorola have been developing as reported by allthingsd back in 2013).  Meanwhile wearables are increasingly being used for monitoring employees in the workplace , including as part of corporate wellness programs.

The upshot of all this is that we are seeeing the mass market application of something academics have been warning about for some time: Namely the use of wearable, ingestable and implantable surveillance technology to segregate and enforce behavioural compliance for the purpose of efficient population management. Given that we are already seeing the use of wearable monitoring devices for both healthcare and criminal justice applications it wouldn’t be too much of a stretch to imagine tags or implants being used by a rightwing government to distingush between ‘deserving‘ and ‘undeserving‘ recipients of wealthfare or healthcare at which point the uberveillance society will have well and truely arrived:

M.G. Michael and K. Michael. “Towards a State of Uberveillance” IEEE Technology and Society Magazine (2010).

We are living in a period where chip implants for the purposes of segregation are being discussed seriously …We will almost certainly witness new, and more fixed forms, of “electronic apartheid.” … The next generation will view this technology as super “cool” and convenient and opt-in without comprehending the full extent of their compliance

Also see:

Gagnon, M., Jacob, J.D. & Guta, A., 2013. Treatment adherence redefined: a critical analysis of technotherapeutics. Nursing inquiry, 20(1), pp.60–70.

We understand that technotherapeutics (as many other health technologies) may be initially welcomed by many of those they are intended to help. These technologies may provide individuals who are chronically ill with a sense of identity and even ‘empowerment’ about their adherence.

…… As has been observed historically, these technologies may ultimately become divisive and serve to differentiate the ‘good’ from the ‘bad’, or, in a bio-political sense, to differentiate those worthy of life (ongoing treatment and support) and those who the state should ‘let die’ (denied future medication or insurance coverage).

Overall, we understand technotherapeutics as serving to both discipline individual bodies and also to regulate whole groups of people deemed to constitute a threat to the collective body. In this sense, we consider that adherence work is above all a political project that endeavors to achieve optimal disease management (through surveillance and discipline), reduce the financial burden of treatment non-adherence on healthcare systems, and serve to further marginalize and differentiate ‘at-risk groups’ because of their unwillingness or inability to conform"



'via Blog this'

8/18/2014

Don’t fear the robot car bomb | Bulletin of the Atomic Scientists

08/17/2014 - 21:45

Don’t fear the robot car bomb

Patrick Lin

PATRICK LIN

Patrick Lin is director of theEthics and Emerging Sciences Group and associate philosophy professor at California Polytechnic State University, San Luis...
More
Within the next few years, autonomous vehicles—alias robot cars—could be weaponized, the US Federal Bureau of Investigation (FBI) fears. In a recently disclosed report,FBI experts wrote that they believe that robot cars would be “game changing” for law enforcement. The self-driving machines could be professional getaway drivers, to name one possibility. Given the pace of developments on autonomous cars, this doesn’t seem implausible.
But what about robotic car bombers? If car bombs no longer require sacrificing the driver’s life, then criminals and terrorists might be more likely to use them. The two-page FBI report doesn’t mention this idea directly, but this scenario has caused much public anxiety anyway—perhaps reasonably so. Car bombs are visceral icons of terrorism in modern times, from The Troubles of Northern Ireland to regional conflicts in the Middle East and Asia.
In the first half of 2014, about 4,000 people were killed or injured in vehicle bombs worldwide. In the last few weeks alone, more than 150 people were killed by car bombs in Iraq, Afghanistan, Yemen, Somalia, Egypt, and Thailand. Even China saw car bombings this summer.
America is no stranger to these crude weapons either. In the deadliest act of domestic terrorism on US soil, a truck bomb killed 168 people and injured about 700 others in Oklahoma City in 1995. That one explosion caused more than $650 million in damage to hundreds of buildings and cars within a 16-block radius. In 1993, a truck bomb parked underneath the World Trade Center killed six people and injured more than a thousand others in the ensuing chaos. And earlier this year, jihadists were calling for more car bombs in America. Thus, popular concerns about car bombs seem all too real.
But what do automated car bombs mean to criminals and terrorists? Perhaps the same as anything else that is automated. Generally, robots take over those jobs called the “three D’s”: dull, dirty, and dangerous. They bring greater precision, more endurance, cost savings, labor efficiencies, force multiplication, ability to operate in inaccessible areas, less risk to human life, and other advantages.
But how would these benefits supposed to play out in robot car bombs? Less well than might be imagined.
Pros and cons. For the would-be suicide car bomber, a robotic car means eliminating the pesky suicide part. By replacing the human driver who is often sacrificed in the detonation of a car bomb, an autonomous vehicle removes a major downside. This aspect is related to the worry that nation-states may be quicker to use force because of armed drones, since those robots remove the political cost of casualties to their own side. When costs got down, adoption rates go up; therefore, we can expect to see an increase in suicide car-bombing incidents, driven by autonomous technologies.
Or so the thinking goes.
But this analysis is too pat. Part of the point for some guerilla fighters—though probably not for ordinary criminals—is martyrdom and its eternal benefits. So, dying isn’t so much of a cost to these terrorists, but rather more of a payoff. This demographic probably wouldn’t be tempted much by self-driving technology, since they are already undeterred by death.
Of course, it may be that a more calculating terrorist, who still seeks glory, would like to do as much damage as possible before he kills himself. (Though some suicide bombers are women, most of them are still men.) In this case, he may want to mastermind several car-bombing attacks before finally dying in one. Robot cars would enable him to do so, and still allow him to get credit for his work, an issue of importance to terrorists, if not to criminals.
And at the least, those not motivated by ideology might not want to die quite so soon. For them, a robotic driver would be an attractive accomplice.
However, other options are already available for terrorists who do not want to harm themselves—yet these options have not created any panic about car-bombing attacks. For instance, both criminals and guerilla fighters have been known to recruit and train others to do their bidding. Those designated as drivers sometimes are not even aware of their explosive cargo, which avoids the trouble of indoctrinating them toward fanatical self-sacrifice. Terrorists could kidnap innocent people and coerce them to become suicide bombers, which is reportedly occurring today in Nigeria.
So if ease and costs are considerations, there are better alternatives than transforming robot cars into mobile bombs. For one thing, the only production cars being built today with self-driving capabilities are the Mercedes Benz S-Class sedan (that sells for about $100,000) and the Infiniti Q50 sedan (about $40,000)—not exactly tools for the budget-conscious terrorist, even if prices do fall in the future. Even then, their capacity to operate autonomously is primarily limited to things such as staying within a lane and following the flow of traffic on a highway.
Google’s self-driving car makes even less sense for this evil purpose. As the most advanced automated car today, it would cost more than a Ferrari 599 at over $300,000—if it were for sale, which as a research vehicle it isn’t. (Even if a terrorist could steal it, good luck figuring out how to turn it on.) Anyway, the car can operate autonomously only aroundGoogle’s headquarters, since ultra-precise maps beyond that area don’t yet exist. In sum, it is not a good choice for targets outside Mountain View, California.
If a fanboy terrorist really did want to go high-tech, he could more easily rig his own car to be driven by remote control. Or kidnap engineers to do the work, as drug cartels in Mexico have done to build communication systems. Or just get some kamikaze micro-drones. All of these options are more likely and more practical, getting the same job done as autonomous car bombs.
Besides bombing, are there post-execution reasons for using a robot car, such as minimizing forensics evidence? A captured driver, or even the DNA of one who is blown up, can attribute an attack to a particular group. But the same could be achieved by stealing a car and coercing an innocent person to drive.
Robot cars may actually be worse for the criminal who wants to keep a low profile. If they are networked and depend on GPS for navigation, the cars could be tracked as soon as they leave the driveway of the suspect under surveillance. GPS records could be searched to piece together a timeline of events, including where the car has been on the days and weeks leading up to its use as a weapon.
Furthermore, a self-driving car without a human in it at all won’t be in production any time soon. A human will always be “in the loop” for the foreseeable future; at the moment, any “self-driving” car is supposed to have someone in the driver’s seat, ready to take the wheel at a moment’s notice, such as when an unexpected construction detour or bad weather interferes with the car’s sensors and a human operator must quickly retake control. So a robot car bomb with no driver in it would likely raise immediate suspicions, if the car would even move at all.
Admittedly, hacks have already appeared that disable the safety features meant to ensure a human is present and alert. Networked and autonomous cars present many more entry points for hackers, possibly allowing a very knowledgeable criminal to cyber-hijack a robot car.
Theoretically, a terrorist could want to use a robot car as a bomb while he’s still in it—that is, forego the opportunity to spare his own life. It could be that he tends to get lost easily, wants to read last-minute instructions behind the wheel, has to stay in contact with his home base, or must baby-sit the trigger mechanism. A robot car would offer these benefits, however minor they may be.
Possible solutions. The threat of robot car bombers, then, seems unlikely but not impossible to become a reality. Some solutions to that possible threat include requiring manufacturers to install a “kill switch” that law enforcement could activate to stop an autonomous vehicle.This plan was already proposed in the European Union for all cars in the future. Or sensors inside the car could be used to detect hazardous cargo and explosives, similar to the sensors at airport security checkpoints. Or regulators could require special registration of owners of autonomous vehicles, cross-referencing customers with criminal databases and terrorist watch-lists.
But any of these options will face fierce resistance from civil rights advocates and other groups.
And a determined terrorist can get around technological safeguards and firewalls.
At the end of the day, there’s still no substitute for good old-fashioned counterterrorism, human intelligence, and vigilance: in recent weeks, security checkpoints foiled car-bombing plots in Northern Ireland and Jerusalem. Overall, it makes more sense to use these traditional methods; it is easier to continue to use checkpoints, and regulate and monitor the ingredients used in car bombs, rather than oversee the cars themselves.
In truth, in the idea behind robot cars, domestic and international security is facing a very old threat. The problem isn’t so much with robots but with stopping enemy vehicles from penetrating city walls with a destructive payload, which is a problem as old as the Trojan horse of ancient Greek mythology. (There’s a reason why a certain kind of malware goes by the same name). Robot cars merely present a new way to deliver the payload.
Maybe this is a problem that doesn’t demand immediate action and is just part of the “new normal”—if it even comes to pass. For hundreds of years, just about every kind of vehicle has been turned into a mobile bomb: horse-drawn buggies, boats, planes, rickshaws, bicycles, motorcycles, and trains.
This could be a case of misplaced priorities. Or, as journalists Matthew Gault and Robert Beckhusen phrased it in War Is Boring: “Americans freak out over small threats and ignore big ones,” For example, a terrorist with a single well-placed match in California during the summertime could easily do a massive amount of economic damage and disrupt transportation, businesses, and ecosystems. It’s the ultimate in low-tech terrorism, yet could plausibly cause hundreds of millions of dollars in damage.
But the appearance of just one robot car bombing could set back the entire autonomous-driving industry, in addition to the loss of life and the property destroyed. And there are other uses, misuses, and abuses related to autonomous cars that should be of just as much—if not more—concern.
First-world problems. Weirdly, robot cars bombs seem to be a decidedly Western—or even American—fear, even though the actual threat posed by car bombs is generally located far elsewhere. Most suicide car bombs happen in the Middle East in a low-tech way, whereas they are very rare in the United States. But because most of the news coverage about a hypothetical robot car bomb has occurred in the US media, it gives the false impression that it’s a first-world problem. Autonomous cars would have a hard time operating on Afghanistan’s dirt roads without lane markings, for instance, even if one could be obtained there.
Perhaps the reason for America’s obsession is that the car bomb is a special, iconic weapon of terror—our prized possession turned against us. Different from rockets and drone missiles that fall from the sky, car bombs can be more insidious. They would infiltrate civilized society, sneaking up on its most vulnerable points. Like matches, cars are omnipresent in the modern world, and thus nearly impossible to control. But very few elaborate car bombings have been attempted, even though they could be done today via remote control or through the use of a kidnapped driver, for example. Simple still works. As an actual threat, the robot car bomb seems overblown.

8/10/2014

The Secrets Of Russia's Propaganda Machine

Of Course, Australia is a puppet of the NAU so this is propaganda about propaganda. But I think they did a good job nonetheless, especially the haunting imagery of the ominous of the Russian GRU (Black Dolphin).





The Front Line Of The USSR's Disastrous 80's Afghanistan War - Trailer

Protothreads - Lightweight, Stackless Threads in C

Protothreads - Lightweight, Stackless Threads in C: "Protothreads
Protothreads are extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads provide linear code execution for event-driven systems implemented in C. Protothreads can be used with or without an underlying operating system to provide blocking event-handlers. Protothreads provide sequential flow of control without complex state machines or full multi-threading."



'via Blog this'

7/17/2014

Raspberry Pi B+ , Quick Overview

CRW takes Texas CHL class...

Defense Distributed’s Cody Wilson Takes Texas CHL Class

Cody Wilson at Red's Range CHL class (courtesy The Truth About Guns)
[NOTE: There will be a comprehension test after this post]
On Sunday I took a field trip to Red’s South in West Austin to sit in a concealed carry instruction class with seven fellow citizens. After wandering to a clapboard classroom at 7:45 am, I began an eight-hour triathlon of cram-school instruction and practical and written examination. We broke for lunch and a clever commercial intermission sponsored by Texas Law Shield. Oh, and along the way I confronted the schizophrenic foundations of the gun community’s civil personality . . .
Now, I could be considered an absolutist on the question of popular access to arms. And that could be an understatement. But let’s begin with moral economics. Recently I discovered an original 1698 printing of John Toland’sThe Militia Reform’d at UT’s Harry Ransom Center. Toland edited the works of John Harrington, perhaps the most influential of the English neo-republican radicals, and was himself quite the rebel.
The Militia Reform'd
His Militia Reform’d is a tract published at the height of the English “standing army controversy,” a political discourse that later informed early American republicanism and the concept of the Militia in its revolutionary imagination. The militia’s role in the operative clause of the Second Amendment is not quite my object today, but if you’re interested, here is an excellent treatment on it as structural feature of the American republic.
The Militia Reform'd text (courtesy The Truth About Guns)
My interest is Toland’s civic humanism which begins with the “Sword in the hands of the People.” As Toland writesas opposed to an army of mercenaries or servants, who will show up to fight for bread, a militia of freeholders will fight for Liberty – a condition they would prefer to life, riches, and honors which, without Liberty, “are of no other use except to prolong a miserable and infamous Slavery.” [This should sound familiar. Our friend Patrick Henry had similar views.]
Toland’s tract is Country party propaganda for English freeholders, but his thesis of the Militia as a school of civic virtue is still useful. This virtue was understood in contradistinction to the corruption of allowing Parliament to raise and pay for a standing army. The corruption was born from the preference, because of the luxury that commercial life provides, to neglect the responsibilities of self-government and self-defense to mercenaries. Let Parliament and the Sovereign raise their select militias and soon enough you find yourself under an absolute government, living at discretion. And that doesn’t sound familiar, does it?
The cult of the professional is a cornerstone of modern political fantasy, and its precepts run a road right through military and police worship. When it comes to use of arms, there’s a toleration, no celebration, of its professional (and therefore political) specialization from red-state conservatives.
Cody Wilson at the sharp end of firearms regulations (courtesy The Truth About Guns)
In my CHL class, a representative from Texas Law Shield introduced himself by naming his every NRA, police, and ATF credential. He closed his eyes and rattled his chains for us. As I stopped listening, the words began to clink like guineas. Yes, current and former police and military are a large and knowledgeable part of the gun owning public. Yes, our CHL instructor was retired police and certainly didn’t fail to mention it. And, but for the uneven treatment of the Fourth Amendment, I found his instruction and experience valuable and civic-minded. But our friends in the military, police, the legislatures and the NRA, are all to some degree agents of Toland’s civic corruption.
There is almost zero fear of the military class and its industrial complex among red-staters. Zero problem with handing over a massive slice of our property to the Congress to sustain these. It is the same with embracing the NRA as a lobby. Fundraising machine, yes, but could that organization be a more uncertain trumpet?
Drafted, promoted, or endorsed the ’24 Uniform Revolver Act, the ’34 National Firearms Act, the ’37 Federal Firearms Act, the ’64 Dodd Bill and  ’68 Gun Control Act, the ’83 McClure Amendments, the ’86 Bullet Ban, and the ’86 FOPA! Oh, so they got religion in ’94 and I’m supposed to drop to my knees that nothing passed in 2013? (Nothing but regulations on my line of work, right?)
Cody Wilson contemplates the FNS-9 (courtesy The Truth About Guns)
We prefer the illusion of a larger and entrenched advocate to actually being one. We would rather glory in the trappings of Empire than see to the Public Liberty. Oh, am I sounding “isolationist?” Again, our friend Patrick HenryWe secretly find the duties of liberty a chore and an embarrassment. Desperate, we rush to abdicate our power to that Potomac circus, ten miles square, where miserable fools will jockey to out-debase each other with it. This to our barely disguised relief!
You see, Toland and Harrington’s civic humanism relied on the ballot and bullet together. Now, compare your zeal for your Second Amendment with the liberal jealousy for the franchise. Where you line up for your plastic ticket to some checkered Second Amendment zone; where you purchase your right’s abridgment from your State legislator and count it a victory, the progressive cabal files suit against every possible qualification for the franchise.
Eric Holder, last week: “I’m attorney general of the United States. … I will not allow people to take away that which people gave their lives to give, and that is the ability for the American people to vote.” You won’t hold your masters in awe with arms, but you can sure as hell anonymously vote for them!
FNS-9 (courtesy The Truth About Guns)
I know. This is a story about my CHL class. Well I took a practical exam where I was required to shoot 50 rounds in rapid little segments—“Fire two shots in three seconds, go!”—that at the very least disadvantaged the disabled and infirm. My instruction was more expensive in lost time alone than any of the old Southern poll taxes when adjusted for inflation (and most CHL classes are not free, dear hearts). The written exam disadvantaged the illiterate and uneducated at the very least, and, even if I was going to apply for the license, when I arrived at DPS I’d have to slap down $140 for the fee.
Are you familiar with Harper v. Virginia Board of Elections? In 1966 the Supreme Court said fees and wealth were unrelated to a citizen’s ability to participate intelligently in electoral process. It said poll taxes violated the Equal Protection Clause of Fourteenth Amendment. When voter literacy tests were taken to the Court in Lassiter v. Northampton County Board of Elections, it found no violation of the Fifteenth Amendment only because the right to vote as established in the Constitution came subject to the imposition of state standards.
But the Second Amendment is articulated without the imposition of state standards. And I submit that the many CHL laws are by that reason alone impeachable on their face. Regardless, the Court has in Heller andMcDonald construed your Second Amendment as the right to carry arms for any lawful purpose, and that this right is incorporated through the Fourteenth Amendment against the states. Well the state CHL processes are invidiously discriminatory and their costs easily violate the Equal Protection clause. I’m not just talking about the joke that is may issue.
Defense Distributed's Cody Wilson at Red's South (courtesy The Truth About Guns)
So why don’t we tear it down? Why live in this domestic image fashioned for us by police and generals and lobbyists? Documentary processes like applications and examinations follow a disciplinary desire in the work of Foucault. There is today a general nostalgia for the sites of concentration and enclosure, which, though losing their specific materiality, have become the general framework of social space and each moment of our daily lives.
Every CHL act and legislative gimmick is still an expansion of the bureaucratic classes, the means of our surveillance, and a deepening of the deep state. And because we know a CHL makes our interactions with the police even more fraught with peril, there may be even darker drives at work. But that’s for another time.
FNS-9 at rest (courtesy The Truth About Guns)
All this talk about the Palladium of LibertyThe right of self defence is the first law of nature: in most governments it has been the study of rulers to confine this right within the narrowest limits possible.” Mere watchwords. Churches litter the streets to hide the death of God, prisons to hide that we are the prisoners, and licenses multiply to hide that we are slaves. Yes, I suspect we enjoy the restriction represented by the CHL. If we were serious about it, this hallowed right to carry a handgun, we’d at least skip the DPS and file in the Fifth Circuit.
crw
COMPREHENSION TEST
Please do not scroll up to check answers, which are posted on TTAG’s Facebook Page.
1. In Militia Reform’d, John Toland writes that “Mercenaries prove extremely tedious and burdensome, they never end till the Country that employs them . . .
A) takes away their MRAPs
B) is exhausted of all its treasure
C) instructs Darrell Issa to launch a Congressional investigation
2. Cody Wilson says the cult of what is a “cornerstone of modern political fantasy”?
A) Ronald Reagan
B) democracy
C) professionalism
D) Reverend Sun Myong Moon
3. Which of these does Cody Wilson consider “to some degree agents of Toland’s civic corruption”?
A) military
B) police
C) the legislatures
D) the NRA
E) Moms Demand Action for Gun Sense in America
F) All of the above except for E
4. Which of these Acts has the wrong date?
A) 1924 Uniform Revolver Act
B) 1934 National Firearms Act
C) 1937 Federal Firearms Act
D) 1965 Dodd Bill
E) 1968 Gun Control Act
F) 1983 McClure Amendments
G) 1986 Bullet Ban
H) 1986 FOPA
5. Cody writes: “We prefer the illusion of a larger and entrenched advocate to actually being one. We would rather glory in the trappings of Empire than see to the Public Liberty. Oh, am I sounding ______?”
A) terpsichorean
B) obstreperous
C) isolationist
D) pretentious
6. What number is on the case of Cody’s FNS-9 (i.e. packed by)?
A) 666
B) 16
C) 18
D) 26
7. Cody says the Texas CHL class disadvantages whom?
A) disabled and infirm
B) illiterate and uneducated
C) 1911 owners shooting hand reloads
D) A & B
E) All of the above
8. Who is Michel Foucault?
A) Who is John Galt?
B) The author of The History of Sexuality
C) The inventor of Foucault’s Pendulum
D) Some random dude
9. Is this the most obtuse sentence in Cody’s article: “There is today a general nostalgia for the sites of concentration and enclosure, which, though losing their specific materiality, have become the general framework of social space and each moment of our daily lives”? [Bonus points for translating it into plain English in the comments.]
A) Yes
B) No
10. Cody says that if we were serious about “this hallowed right to carry a handgun” we’d skip the Texas Department of Public Safety and do what?
A) Go to Schmidt’s Barbecue in Bee Caves for a quarter poind of lean
B) File a lawsuit at the Fifth Circuit Court
C) Carry without a permit
avatar

About Robert Farago

Robert Farago is the Publisher of The Truth About Guns (TTAG). He started the site to explore the ethics, morality, business, politics, culture, technology, practice, strategy, dangers and fun of guns.

Raspberry Pi Three Node Supercomputer

7/08/2014

On Family Annihilation killings by Law Enforcement officers...

BUT let me be absolutely clear, those men who committed those acts of family annihilation had also inflicted the terror of US (NAU, UK, NZ, AU) family law on others. So they are not only the victims of that system but also the perpetrators. And law enforcement who enforces the machinery of unconstitutional NAU family law oppression in this country and around the globe are each "Little Mengeles", that is to say persons for whom the power of authority trumps any ethical consideration of moral right and wrong, to say nothing of the dubious nature of enforcing laws which are patently unconstitutional on the face of it. In that sense then they can be said to be anti-social opportunists who need the social discipline of the revolutionary overthrow of the NAU system.

7/06/2014

ATom

There I was in high school at home reading (unassigned) Richard Rhodes Making of the Atomic bomb. Still not quite getting it, only later, now in college, tepidly pursuing a degree in philosophy, while playing on the Clausewitz engine that then and only then had I the realization of the mechanism.

6/02/2014

Angecryption (english)

Entropy for Arduino!

The new version includes a change from Paul Stoffregen that allows the library to run on his Teensy 3.x boards.

A library for AVR's or Arduino's that make use of the watchdog timer's natural jitter to produce a reliable stream of true random numbers.  Unlike other methods currently available, this library requires no external hardware and produces a considerably more random number stream than methods based upon the technique of reading an unconnected analog pin.

Introduction

I first heard about the method on a thread at the Arduino forum.  The information on that thread caused me to begin experimenting with the method and finally conclude that it appears to be capable of producing cryptographically useful random numbers at best and the best source of unpredictable numbers on the Arduino platform at worst.

This library only works on those AVR chips that have a watchdog reset interrupt vector, as such this library will not work with an ATmega8 series of chips.  This library is a fully function integer based random number generator; however, if you only need to provide a good seed value to the internal random function a short example of how to use the same basic techniques as implemented in the library without the overhead inccurred can be found here.

Details

This site will always contain the source for the latest version of the library in the Source tab as well as a zip file containing the most current tested version of the library in the Downloads tab.  The library is designed to be installed as a typical Arduino library (see Arduino reference manual for details) or included in a c++ project file for normal AVR development.


VIA : https://sites.google.com/site/astudyofentropy/project-definition/timer-jitter-entropy-sources/entropy-library

3/24/2014

Arduino Tutorial #10: Arduino to Arduino I2C

2C Data Logger Using ATmega328p and DS3232 – II Kerry D. Wong

2C Data Logger Using ATmega328p and DS3232 – II

In my last blog post, I showed you the schematic of a I2C data logger I built. Here I will discuss some sample code used for this data logger and how to make it even more flexible.
I will use the triple accelerometer digital level I built a while ago as an example and use it as the data source to measure vibrations and accelerations. The type of data source is not that important as long as it supports I2C.
The following is a picture of this setup, as you can see the accelerometer and the data logger are connected via the I2C bus.
I2C Data Logger
In this example, the accelerometer is set as an I2C slave. The I2C related code is shown below:
?
1
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
void TWIRequest()
{
    byte xlow, xhigh, ylow, yhigh, zlow, zhigh;
    byte ay[6];
 
    xlow = vx & 255;
    xhigh = (vx & (255 << 8)) >> 8;
    ylow = vy & 255;
    yhigh = (vy & (255 << 8)) >> 8;
    zlow = vz & 255;
    zhigh = (vz & (255 << 8)) >> 8;
 
    ay[0] = xlow;
    ay[1] = xhigh;
    ay[2] = ylow;
    ay[3] = yhigh;
    ay[4] = zlow;
    ay[5] = zhigh;
 
    Wire.send(ay, 6);
}
......
void setup() {
    ......
    Wire.begin(TWI_ADDR);
    Wire.onRequest(TWIRequest);
}
As you can see, whenever the accelerometer receives a request from the I2C master, the TWIRequest method is automatically called and the values for the x,y,z axes are then sent. Note that since the values for the x,y,z axes are integers and not bytes, the value for each axis is represented by two bytes. After the value bytes are transferred to to host, the bytes are assembled back into integers again. The rest of the code used for the accelerometer is similar to what I had written about before so I will not repeat here.
The code on the data logger side is a bit more complex as it needs to handle RTC/SD Card and the I2C communication between the slave and master devices.
Here is the code listing:
?
1
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#define __AVR_ATmega328P__
 
#include <binary.h>
#include <HardwareSerial.h>
#include <pins_arduino.h>
#include <WConstants.h>
#include <wiring.h>
#include <wiring_private.h>
#include <Wire/utility/twi.h>
#include <Wire/Wire.h>
#include <WProgram.h>
#include <EEPROM/EEPROM.h>
#include <SdFat/SdFat.h>
#include <SdFat/SdFatUtil.h>
 
#define DS3232_I2C_ADDRESS B01101000  // This is the I2C address 7bits
const int ACC_SENSOR_ADDR = 100;
 
Sd2Card card;
SdVolume volume;
SdFile root;
SdFile file;
 
typedef struct {
  byte second;
  byte minute;
  byte hour;
  byte dayOfWeek;
  byte dayOfMonth;
  byte month;
  byte year;
} Date;
 
Date pD;
 
byte decToBcd(byte val)
{
  return ( (val/10*16) + (val%10) );
}
 
byte bcdToDec(byte val)
{
  return ( (val/16*10) + (val%16) );
}
 
void getDateDS3232()
{
  // Reset the register pointer
  Wire.beginTransmission(DS3232_I2C_ADDRESS);
  Wire.send(0x00); //move to reg 0
  Wire.endTransmission();
 
  int vBytesToRead = 7;
  Wire.requestFrom(DS3232_I2C_ADDRESS, vBytesToRead);
   
  pD.second     = bcdToDec(Wire.receive() & 0x7f);
  pD.minute     = bcdToDec(Wire.receive() & 0x7f);
  pD.hour       = bcdToDec(Wire.receive() & 0x3f); // Need to change this if 12 hour am/pm
  pD.dayOfWeek  = bcdToDec(Wire.receive() & 0x07); //0= sunday
  pD.dayOfMonth = bcdToDec(Wire.receive() & 0x3f);
  pD.month      = bcdToDec(Wire.receive() & 0x1f);
  pD.year       = bcdToDec(Wire.receive());
 
  Wire.endTransmission();
}
 
void setControlRegisters(){
  Wire.beginTransmission(DS3232_I2C_ADDRESS);
  Wire.send(0x0E); //Goto register 0Eh
  Wire.send(B00011100);
  Wire.send(B10000000);
  Wire.endTransmission();
}
 
void setupRTC3232(){
  Wire.begin();
  setControlRegisters();
 
}
 
char formatStrFileName[]="%02d%02d%02d%02d.txt";
char fileName[20];
 
char *ftoa(char *a, double f, int precision)
{
  long p[] = { 0,10,100,1000,10000,100000,1000000,10000000,100000000  };
 
  char *ret = a;
  long heiltal = (long)f;
  itoa(heiltal, a, 10);
  while (*a != '\0') a++;
  *a++ = '.';
  long desimal = abs((long)((f - heiltal) * p[precision]));
  itoa(desimal, a, 10);
  return ret;
}
 
void setup() {
  setupRTC3232();
 
  pinMode(16, OUTPUT);
  digitalWrite(16, LOW); 
  pinMode(17, OUTPUT);
  digitalWrite(17, HIGH);
 
  card.init();
  volume.init(card);
  root.openRoot(volume);
 
  getDateDS3232();
  sprintf(fileName, formatStrFileName, pD.month, pD.dayOfMonth, pD.second, random(100));
  file.open(root, fileName, O_CREAT | O_EXCL | O_WRITE);
  file.writeError = false;
}
 
char lineStr[50];
char lineFormat[] ="%02d%02d%02d %d %d %d";
 
int counter = 0;
byte xlow, xhigh, ylow, yhigh, zlow, zhigh;
int x, y, z;
 
void loop() {
  counter++;
  getDateDS3232();
 
  Wire.requestFrom(ACC_SENSOR_ADDR, 6);
 
  xlow = Wire.receive();
  xhigh = Wire.receive();
  ylow = Wire.receive();
  yhigh = Wire.receive();
  zlow = Wire.receive();
  zhigh = Wire.receive();
 
  x = xlow | xhigh << 8;
  y = ylow | yhigh << 8;
  z = zlow | zhigh << 8;
 
  sprintf(lineStr, lineFormat, pD.hour, pD.minute, pD.second, x, y, z);
 
  file.println(lineStr);
  if (counter == 100) {
    counter = 0;
    file.close();
    file.open(root, fileName, O_CREAT | O_APPEND | O_WRITE);
  }
 
  delay(100);
}
As you can see from the code above, the accelerometer data is retrieved using the Wire.requestFrom statement, and 6 bytes are reassembled into the three integer values.
A trick was used to prevent frequent write activities to the SD card. In the code above, we close the file handle at an interval of every 100 lines and re-open the file for the coming operations. As a draw back, if power is lost before the file handle closes, up to 100 line of data can be lost. But for long running data logging operations, this should not be an issue.
The following images illustrate some of the data logged during a test run. In this particular case, I placed the data logger in my car and drove around the town. The accelerometer is in 2g mode and the recorded data has a 12bit resolution. The x axis data can be used to analyze the number of turns I made during that trip. The y axis data can be used to analyze the acceleration/deceleration and the z axis data can be used to analyze the road surface condition. The flat regions can be used to count how many times I had stopped in that trip.
X Axis
X Axis
Y Axis
Y Axis
Z Axis
Z Axis
Even though the example I used above needed to code the data logger side specifically to accommodate the data coming from the accelerometer, this data logger code can be generalized a bit more to accommodate a larger set of I2C slave devices.
One way to achieve this is as follows:
Upon powering up, the slave would send a “magic” packet to the master, inside which the slave’s data type format (e.g. whether it is integer or byte) and data length (how many bytes are there in the payload) are included. As long as all the slaves use the same handshake packet data sequence, we can detect what specific data format (i.e. whether it is byte or integer and what is the length) a slave uses at the I2C master device side.
The slave side code may look like the following (we use five consecutive 200′s as the magic packet and the data type and data length are immediately followed. In this case, we use 1 to represent integer and 2 to represent byte):
?
1
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
#include <Wire.h>
 
const int TWI_ADDR = 100;
 
byte HAND_SHAKE_PACKET[]={200,200,200,200,200, 1, 10};
boolean configured = false;
 
void TWIRequest()
{
  if (configured) {
  byte ay1[] = {0,1,2,3,4,5,6,7,8,9};
    Wire.send(ay1, 10);
  } else {  
    Wire.send(HAND_SHAKE_PACKET,7);
    configured = true;
  }
}
 
void setup() {
  Wire.begin(TWI_ADDR);
  Wire.onRequest(TWIRequest);
}
 
void loop()
{
}
On the I2C master’s side, we can use a fixed slave address. Note that the fixed address is only possible if the slave side is using the same device or the slave side uses a microcontroller. Since different slave devices may transmit data of different lengths, the I2C master need to be able to handle all the possibilities. One way to achieve this is to set the data length (NUM_DATAPOINTS) to be the longest among all possible I2C slaves. If the data provided to the I2C master is less than the preset data length, the received data would simply be 0′s after the desired length. A more elegant approach would be using the exact number of bytes indicated in the magic packet. Depending on the data type, the I2C master would handle the incoming data accordingly.
The code on the I2C master side can be very complex, but the general approach can be illustrated as follows:
?
1
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
#include <Wire.h>
 
const int ACC_SENSOR_ADDR = 100;
const int NUM_DATAPOINTS = 10;
 
void setup()
{
  Wire.begin();
}
 
void loop()
{
  Serial.println("------"); 
  Wire.requestFrom(ACC_SENSOR_ADDR, NUM_DATAPOINTS);
   
  //procedures to handle the magic packets
  ...
  for (int i = 0 ; i < NUM_DATAPOINTS; i++) {
    byte d =  Wire.receive();
 
  //code to handle different data type depending on what is read from the master packet
    ...
  }
   
  delay(100);
}
Since the magic packet is only sent during a power cycle event on the I2C slave’s side, this approach requires the power at the master’s side to be stable. Should the I2C master loose power, it would not be able to infer the data type of the incoming packets unless the slave is restarted. More advanced messaging scheme can be address this shortcoming, but it is beyond the scope of this discussion.
Be Sociable, Share!

Leave a Reply