No. Undergraduates almost never have control over whether or not their work gets published. Some luck into a project that's almost done or working really well (like, every experiment is useful), and get a bunch of papers quickly. Others fall into projects that just go on and on as your mentor lurches from one failed experiment to the next. Don't sweat it. Many undergrads never get publications, and the ones who do are usually 2nd-to-beyond authors. It's a rare one that nabs a first author (of course this being SDN I await the 3 posts below me trumpeting their first author Nature papers they wrote while volunteering as an EMT for 400 hours and getting a 43S on the MCAT).