As the election results rolled in last night, it became increasingly clear that America — and the world — would never be the same. The American people overlooked all of Republican nominee Donald Trump's faults and elected him to office in the belief that he will fix the nation's deep-seated problems of inequity and injustice. And they rebelled against the business interests and corruption that they believed Hillary Clinton represented.

Trump's victory was enabled by technology — everything from his use of social media to Clinton's email scandals to Russian hacking. But advancements in technology and how they reshape our economy may also keep him from delivering on some of the major promises that made him so popular during the campaign season.

The truth is that, over recent decades, the rich have been getting richer. Power has shifted to Wall Street and business. Globalization has caused the loss of millions of jobs in the United States. Some white Americans have also been terrified at the changing complexion — and values — of the country. Trump very smartly played to these fears and promised his supporters what he knew they wanted: greater economic opportunity by bringing back jobs shipped overseas.

But those jobs, many in the manufacturing sector, are increasingly done by technology. Machines are learning to do the jobs of manufacturing workers; artificial intelligence-based tools are mastering the jobs of call-center and knowledge workers; and cars are beginning to drive themselves.

Over the next decade, technology will decimate more jobs in many professions, inequality will increase and more people will be disadvantaged.

Some robots already cost less to operate than the salaries of the humans they replace, and they are getting cheaper and better. Boston Consulting Group predicts that, by 2025, the operating cost of a robot that does welding will be less than $2 per hour, for example.

That's more affordable than the $25 per hour that a human welder earns today in the U.S., and even cheaper than the pay of skilled workers in the lowest-income countries.

Trump may be able to keep immigrants out, but how will he stop the advance of robots?

Uber and many other companies are working on developing cars and trucks that don't need a driver in the driver's seat. According to the American Trucking Associations, approximately 3 million truck drivers were employed in the United States in 2010, and 6.8 million others were employed in other jobs relating to trucking activity, including manufacturing trucks, servicing trucks and other types of jobs.

So roughly one of every 15 workers in the country is employed in the trucking business. According to the U.S. Bureau of Labor Statistics, roughly another 300,000 people work as taxi drivers and chauffeurs. We could be talking about millions of jobs disappearing in the early 2020s.

And then there is the "gig economy" that has some businesses shifting toward part-time, on-demand employment. Uber has already done this to taxi drivers, and other technology companies are doing it to a wide range of jobs.

A study by software company Intuit predicted that by 2020, 40 percent of American workers will be independent contractors, temps or self-employed, and that full-time jobs will be harder to find. We are talking about 60 million people in this category. The problem is that not only do such part-time workers lack reliable full-time jobs and sick pay, but they are not entitled to health insurance and longer-term benefits.

Even if President Barack Obama's health care plan continued, they would not be able to afford it.

The remedies that are being proposed are to impose trade barriers. But closing the doors to foreign trade won't bring jobs back. It will only slow the global economy and hurt American exports, thereby shrinking the U.S. economy and accelerating job loss.

The silver lining to this dark cloud is that these technology advances also provide solutions to the problems of humanity, such as a lack of energy, food, education and health care. The production costs of clean energies, such as solar and wind, will keep falling till they are almost free. With artificial intelligence-based applications, we will have digital doctors advising us, and advances in medicine will allow us to live longer and healthier lives.

Robots will do our chores; digital tutors will teach us new skills. It becomes possible to provide for everyone's needs. But all of this requires understanding the cause and effects of inequity and applying more carefully the technologies that are going to change the equation.

We now need a nationwide conversation on how we can distribute the prosperity we are creating. We must create equity and fairness in our legal, justice and economic systems. And, recognizing that technology will disrupt entire industries and wipe out millions of jobs, so we must ease the transition and pain for the people most affected and least prepared.

Wadhwa is Distinguished Fellow and professor at Carnegie Mellon University Engineering at Silicon Valley and a director of research at Center for Entrepreneurship and Research Commercialization at Duke. His past appointments include Stanford Law School, the University of California, Berkeley, Harvard Law School, and Emory University.