I've been working as an independent designer for 17 years or more now. I don't ever work for free and I never have shares or risk in my clients business.
Sometimes I do a bit of work and get paid a few £k and they sell zillions, maybe even patenting an idea of mine and I get zilch. That's fine by me.
Because sometimes I get paid a few £k * 10 and do the design but it doesn't work in the market, or for some other reason make any one any money, but I still got paid for the work I did.
You have to decide if you want to gamble - I prefer engineering - I'd like to be rich, but not enough to be prepared to do what's needed to get rich.
In your case - unless the other party has cheated in any way, you should do what you said you would - and then discuss a new deal.
4 months isn't long - put it down to experience if you feel you've been had.
If you feel that the other guys are not playing the game:
Share this problem with the rest of the team.
But first work out what you want - is it shares and influence or zero risk.
MK
So you're getting paid a fixed amount for the work and the others are getting paid depending on how the project goes? It sounds like they're taking a risk on the project that you decided not to. The MD for instance will get a huge payout if it works and potentially lose money paying you if it flops. That's how it goes. I have known of companies where people doing exactly the same job were payed differently due to how they negotiated when employed.
If you're being paid what you agreed for the work you agreed to do then it sounds like you should complete the work. if others have a better deal than you, then you may do better when negotiating you next contract. These 4 months will be a good learning experience.
It sounds like this is a great learning experience, and yes others are possibly going to make more money.
My thoughts here is that you're writing code for them, its theirs.
You have to share the code, but not all the other notes, methods and things that you know, so keep the comments low and the other documentation to yourself.
You have negotiated to work for 4 months and at the end of 4 months you can walk out. HOWEVER if they aren't complete and need you, you have some very powerful leverage.
You need to ensure you have detailed the extra work, and if necessary show that when your time is up. With that information they cannot claim you haven't performed.
You made a suggestion (which should be acknowledged as helping them) for different hardware, and your work ensured it works as expected.
Use this as bargaining, and suggest that you've helped ensure it is viable while still upholding your end of the agreement.
This is a startup and may not go onto greater things.
You've learned some valuable lessons and received some money to keep the wolves at the door.
More that either of those you've kept your integrity and done what you were asked to do, plus extras, and in my books you can't buy that or pay someone else for it.
Near to your 4 months I'd start looking for alternatives and use this example in your CV.
You may get a better offer from this company and then you are prepared to negotiate based on what you know now.
I've been told it is always easier to find employment while you're in employment.
I'm not sure if it is true but I've worked for 7 others (well one was for ourselves) in my time and apart from one, I stepped from one job to another.
Cheers
Mark
Your sentiments in your situation are normal, but I don't think you messed up. You had good reasons for taking the job and you are accomplishing even more than expected. If you are over-delivering for less compensation, you are delivering great value. Celebrate it and keep track of it - it will look great on your resume and lead to better wages.
If you are working for a company there are benefits to being seen as "good value" - you get more promotions, more raises and fewer layoffs.
You will be happier if you avoid the trap of envying those who get more compensation with less work. If you let that situation make you unhappy, you are doomed to always be unhappy, because there is always someone who makes more with less work.
I've seen a lot of start-ups fail due to greed - someone wants a bigger slice of the pie. It leads to friction, secrecy, silo-mentality, dysfunction and failure. In a large corporation it leads to all the same things, but the immediate impact is more often just high turn-over.
I have been involved in a lot of projects over the years.
Rule No. 1, no change is free! When you agree to do the job and the requirements change, you renegotiate compensation based upon the magnitude of the change. Requirement bloat is a standard tactic to get more from you without additional compensation. If the schedule is at risk, YOU have the power. Don't be afraid to ask for more.
Rule No. 2, make sure all tasks are clearly defined. It helps you with Rule No. 1.
Rule No. 3, if the customer pleads that they are poor, then ask for a piece of the action.
DAB
There are so many factors in who gets paid what. Some of it is fair (like more pay for high demand services or lots of experience), some seems unfair (people paid to do very little, CEO making >100 times more than average, or just that some lucky people get in on the ground floor out of sheer luck). But, as I hear often "Life is not fair, get over it".
When it comes to doing business, your life situations effect your choices. I am semi-retired and consult on the side, so it is more of hobby than a means to supporting a lifestyle. I prefer to work on fixed price contracts, as I prefer not to count or justify hours. I have found that I prefer using a firm (upworks) to act as escrow between me and my clients (although I do choose to work with some former clients direct once we have established a mutual trust). I have had good success working in this manner. I tend to me a little more amendable to accommodating client changes, as long as these do not too crazy (unforeseen changes do occur).
Whatever you choose to do, remember that skill and experience are the most important things that you have to offer and no matter how skilled you are you might not land in a big pot of money. You may at times bring more to the table, but others most likely got there in front of you and will be getting a large share because of that. Being early to the party (like in a startup) can be beneficial, but also very risky.
Good luck in whatever path you choose.
Gene